home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 / Aminet - June 1993 [Walnut Creek].iso / ab20 / utilitys / editors / emacs185.lha / emacs / lisp / amiga-simple.elc < prev    next >
Emacs Compiled Lisp  |  1992-02-23  |  37.9 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text


This file was processed as: Emacs Compiled Lisp (other/emacsCompiledLisp).
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
1% dexvert Emacs Compiled Lisp (other/emacsCompiledLisp) magic Unsupported
100% file Emacs v18 byte-compiled Lisp data default
99% file data default
100% gt2 Kopftext: '(defun open-line (arg) ' default (weak)
100% xdgMime text/x-emacs-lisp default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 0a 28 64 65 66 75 6e 20 | 6f 70 65 6e 2d 6c 69 6e |.(defun |open-lin|
|00000010| 65 20 28 61 72 67 29 20 | 22 5c 0a 49 6e 73 65 72 |e (arg) |"\.Inser|
|00000020| 74 20 61 20 6e 65 77 6c | 69 6e 65 20 61 6e 64 20 |t a newl|ine and |
|00000030| 6c 65 61 76 65 20 70 6f | 69 6e 74 20 62 65 66 6f |leave po|int befo|
|00000040| 72 65 20 69 74 2e 0a 57 | 69 74 68 20 61 72 67 2c |re it..W|ith arg,|
|00000050| 20 69 6e 73 65 72 74 73 | 20 74 68 61 74 20 6d 61 | inserts| that ma|
|00000060| 6e 79 20 6e 65 77 6c 69 | 6e 65 73 2e 22 20 28 69 |ny newli|nes." (i|
|00000070| 6e 74 65 72 61 63 74 69 | 76 65 20 22 2a 70 22 29 |nteracti|ve "*p")|
|00000080| 20 28 62 79 74 65 2d 63 | 6f 64 65 20 22 c2 88 6e | (byte-c|ode "..n|
|00000090| 85 08 00 6f 3f 18 08 85 | 10 00 c3 c4 21 88 09 c5 |...o?...|....!...|
|000000a0| 56 85 26 00 c6 63 88 60 | 53 62 88 09 53 89 11 88 |V.&..c.`|Sb..S...|
|000000b0| 82 11 00 88 08 85 2e 00 | c3 c7 21 29 87 22 20 5b |........|..!)." [|
|000000c0| 66 6c 61 67 20 61 72 67 | 20 6e 69 6c 20 66 6f 72 |flag arg| nil for|
|000000d0| 77 61 72 64 2d 63 68 61 | 72 20 2d 31 20 30 20 31 |ward-cha|r -1 0 1|
|000000e0| 30 20 31 5d 20 34 29 29 | 0a 0a 28 64 65 66 75 6e |0 1] 4))|..(defun|
|000000f0| 20 73 70 6c 69 74 2d 6c | 69 6e 65 20 6e 69 6c 20 | split-l|ine nil |
|00000100| 22 5c 0a 53 70 6c 69 74 | 20 63 75 72 72 65 6e 74 |"\.Split| current|
|00000110| 20 6c 69 6e 65 2c 20 6d | 6f 76 69 6e 67 20 70 6f | line, m|oving po|
|00000120| 72 74 69 6f 6e 20 62 65 | 79 6f 6e 64 20 70 6f 69 |rtion be|yond poi|
|00000130| 6e 74 20 76 65 72 74 69 | 63 61 6c 6c 79 20 64 6f |nt verti|cally do|
|00000140| 77 6e 2e 22 20 28 69 6e | 74 65 72 61 63 74 69 76 |wn." (in|teractiv|
|00000150| 65 20 22 2a 22 29 20 28 | 62 79 74 65 2d 63 6f 64 |e "*") (|byte-cod|
|00000160| 65 20 22 c2 88 c3 c4 21 | 88 69 60 19 18 c5 63 88 |e "....!|.i`...c.|
|00000170| c6 08 c7 5c 22 88 09 62 | 2a 87 22 20 5b 63 6f 6c |...\"..b|*." [col|
|00000180| 20 70 6f 73 20 6e 69 6c | 20 73 6b 69 70 2d 63 68 | pos nil| skip-ch|
|00000190| 61 72 73 2d 66 6f 72 77 | 61 72 64 20 22 20 09 22 |ars-forw|ard " ."|
|000001a0| 20 31 30 20 69 6e 64 65 | 6e 74 2d 74 6f 20 30 5d | 10 inde|nt-to 0]|
|000001b0| 20 34 29 29 0a 0a 28 64 | 65 66 75 6e 20 71 75 6f | 4))..(d|efun quo|
|000001c0| 74 65 64 2d 69 6e 73 65 | 72 74 20 28 61 72 67 29 |ted-inse|rt (arg)|
|000001d0| 20 22 5c 0a 52 65 61 64 | 20 6e 65 78 74 20 69 6e | "\.Read| next in|
|000001e0| 70 75 74 20 63 68 61 72 | 61 63 74 65 72 20 61 6e |put char|acter an|
|000001f0| 64 20 69 6e 73 65 72 74 | 20 69 74 2e 0a 55 73 65 |d insert| it..Use|
|00000200| 66 75 6c 20 66 6f 72 20 | 69 6e 73 65 72 74 69 6e |ful for |insertin|
|00000210| 67 20 63 6f 6e 74 72 6f | 6c 20 63 68 61 72 61 63 |g contro|l charac|
|00000220| 74 65 72 73 2e 0a 59 6f | 75 20 6d 61 79 20 61 6c |ters..Yo|u may al|
|00000230| 73 6f 20 74 79 70 65 20 | 75 70 20 74 6f 20 33 20 |so type |up to 3 |
|00000240| 6f 63 74 61 6c 20 64 69 | 67 69 74 73 2c 20 74 6f |octal di|gits, to|
|00000250| 20 69 6e 73 65 72 74 20 | 61 20 63 68 61 72 61 63 | insert |a charac|
|00000260| 74 65 72 20 77 69 74 68 | 20 74 68 61 74 20 63 6f |ter with| that co|
|00000270| 64 65 22 20 28 69 6e 74 | 65 72 61 63 74 69 76 65 |de" (int|eractive|
|00000280| 20 22 2a 70 22 29 20 28 | 62 79 74 65 2d 63 6f 64 | "*p") (|byte-cod|
|00000290| 65 20 22 c2 88 c3 20 18 | 09 c4 56 85 16 00 08 63 |e "... .|..V....c|
|000002a0| 88 09 53 89 11 88 82 05 | 00 29 87 22 20 5b 63 68 |..S.....|.)." [ch|
|000002b0| 61 72 20 61 72 67 20 6e | 69 6c 20 72 65 61 64 2d |ar arg n|il read-|
|000002c0| 71 75 6f 74 65 64 2d 63 | 68 61 72 20 30 5d 20 34 |quoted-c|har 0] 4|
|000002d0| 29 29 0a 0a 28 64 65 66 | 75 6e 20 64 65 6c 65 74 |))..(def|un delet|
|000002e0| 65 2d 69 6e 64 65 6e 74 | 61 74 69 6f 6e 20 28 26 |e-indent|ation (&|
|000002f0| 6f 70 74 69 6f 6e 61 6c | 20 61 72 67 29 20 22 5c |optional| arg) "\|
|00000300| 0a 4a 6f 69 6e 20 74 68 | 69 73 20 6c 69 6e 65 20 |.Join th|is line |
|00000310| 74 6f 20 70 72 65 76 69 | 6f 75 73 20 61 6e 64 20 |to previ|ous and |
|00000320| 66 69 78 20 75 70 20 77 | 68 69 74 65 73 70 61 63 |fix up w|hitespac|
|00000330| 65 20 61 74 20 6a 6f 69 | 6e 2e 0a 57 69 74 68 20 |e at joi|n..With |
|00000340| 61 72 67 75 6d 65 6e 74 | 2c 20 6a 6f 69 6e 20 74 |argument|, join t|
|00000350| 68 69 73 20 6c 69 6e 65 | 20 74 6f 20 66 6f 6c 6c |his line| to foll|
|00000360| 6f 77 69 6e 67 20 6c 69 | 6e 65 2e 22 20 28 69 6e |owing li|ne." (in|
|00000370| 74 65 72 61 63 74 69 76 | 65 20 22 2a 50 22 29 20 |teractiv|e "*P") |
|00000380| 28 62 79 74 65 2d 63 6f | 64 65 20 22 c1 88 c2 20 |(byte-co|de "... |
|00000390| 88 08 85 0c 00 c3 c4 21 | 88 68 c5 3d 85 1b 00 c6 |.......!|.h.=....|
|000003a0| 60 60 53 5c 22 88 c7 20 | 87 22 20 5b 61 72 67 20 |``S\".. |." [arg |
|000003b0| 6e 69 6c 20 62 65 67 69 | 6e 6e 69 6e 67 2d 6f 66 |nil begi|nning-of|
|000003c0| 2d 6c 69 6e 65 20 66 6f | 72 77 61 72 64 2d 6c 69 |-line fo|rward-li|
|000003d0| 6e 65 20 31 20 31 30 20 | 64 65 6c 65 74 65 2d 72 |ne 1 10 |delete-r|
|000003e0| 65 67 69 6f 6e 20 66 69 | 78 75 70 2d 77 68 69 74 |egion fi|xup-whit|
|000003f0| 65 73 70 61 63 65 5d 20 | 35 29 29 0a 0a 28 64 65 |espace] |5))..(de|
|00000400| 66 75 6e 20 66 69 78 75 | 70 2d 77 68 69 74 65 73 |fun fixu|p-whites|
|00000410| 70 61 63 65 20 6e 69 6c | 20 22 5c 0a 46 69 78 75 |pace nil| "\.Fixu|
|00000420| 70 20 77 68 69 74 65 20 | 73 70 61 63 65 20 62 65 |p white |space be|
|00000430| 74 77 65 65 6e 20 6f 62 | 6a 65 63 74 73 20 61 72 |tween ob|jects ar|
|00000440| 6f 75 6e 64 20 70 6f 69 | 6e 74 2e 0a 4c 65 61 76 |ound poi|nt..Leav|
|00000450| 65 20 6f 6e 65 20 73 70 | 61 63 65 20 6f 72 20 6e |e one sp|ace or n|
|00000460| 6f 6e 65 2c 20 61 63 63 | 6f 72 64 69 6e 67 20 74 |one, acc|ording t|
|00000470| 6f 20 74 68 65 20 63 6f | 6e 74 65 78 74 2e 22 20 |o the co|ntext." |
|00000480| 28 69 6e 74 65 72 61 63 | 74 69 76 65 20 22 2a 22 |(interac|tive "*"|
|00000490| 29 20 28 62 79 74 65 2d | 63 6f 64 65 20 22 c0 88 |) (byte-|code "..|
|000004a0| 8a c1 20 88 c2 c3 21 86 | 15 00 8a c4 c5 21 88 c2 |.. ...!.|.....!..|
|000004b0| c6 21 29 83 1c 00 c0 82 | 1e 00 c7 63 29 87 22 20 |.!).....|...c)." |
|000004c0| 5b 6e 69 6c 20 64 65 6c | 65 74 65 2d 68 6f 72 69 |[nil del|ete-hori|
|000004d0| 7a 6f 6e 74 61 6c 2d 73 | 70 61 63 65 20 6c 6f 6f |zontal-s|pace loo|
|000004e0| 6b 69 6e 67 2d 61 74 20 | 22 5e 5c 5c 7c 5c 5c 73 |king-at |"^\\|\\s|
|000004f0| 29 5c 5c 7c 24 22 20 66 | 6f 72 77 61 72 64 2d 63 |)\\|$" f|orward-c|
|00000500| 68 61 72 20 2d 31 20 22 | 5c 5c 73 28 5c 5c 7c 5c |har -1 "|\\s(\\|\|
|00000510| 5c 73 27 22 20 33 32 5d | 20 35 29 29 0a 0a 28 64 |\s'" 32]| 5))..(d|
|00000520| 65 66 75 6e 20 64 65 6c | 65 74 65 2d 68 6f 72 69 |efun del|ete-hori|
|00000530| 7a 6f 6e 74 61 6c 2d 73 | 70 61 63 65 20 6e 69 6c |zontal-s|pace nil|
|00000540| 20 22 5c 0a 44 65 6c 65 | 74 65 20 61 6c 6c 20 73 | "\.Dele|te all s|
|00000550| 70 61 63 65 73 20 61 6e | 64 20 74 61 62 73 20 61 |paces an|d tabs a|
|00000560| 72 6f 75 6e 64 20 70 6f | 69 6e 74 2e 22 20 28 69 |round po|int." (i|
|00000570| 6e 74 65 72 61 63 74 69 | 76 65 20 22 2a 22 29 20 |nteracti|ve "*") |
|00000580| 28 62 79 74 65 2d 63 6f | 64 65 20 22 c0 88 c1 c2 |(byte-co|de "....|
|00000590| 21 88 c3 60 c4 c2 21 88 | 60 5c 22 87 22 20 5b 6e |!..`..!.|`\"." [n|
|000005a0| 69 6c 20 73 6b 69 70 2d | 63 68 61 72 73 2d 62 61 |il skip-|chars-ba|
|000005b0| 63 6b 77 61 72 64 20 22 | 20 09 22 20 64 65 6c 65 |ckward "| ." dele|
|000005c0| 74 65 2d 72 65 67 69 6f | 6e 20 73 6b 69 70 2d 63 |te-regio|n skip-c|
|000005d0| 68 61 72 73 2d 66 6f 72 | 77 61 72 64 5d 20 35 29 |hars-for|ward] 5)|
|000005e0| 29 0a 0a 28 64 65 66 75 | 6e 20 6a 75 73 74 2d 6f |)..(defu|n just-o|
|000005f0| 6e 65 2d 73 70 61 63 65 | 20 6e 69 6c 20 22 5c 0a |ne-space| nil "\.|
|00000600| 44 65 6c 65 74 65 20 61 | 6c 6c 20 73 70 61 63 65 |Delete a|ll space|
|00000610| 73 20 61 6e 64 20 74 61 | 62 73 20 61 72 6f 75 6e |s and ta|bs aroun|
|00000620| 64 20 70 6f 69 6e 74 2c | 20 6c 65 61 76 69 6e 67 |d point,| leaving|
|00000630| 20 6f 6e 65 20 73 70 61 | 63 65 2e 22 20 28 69 6e | one spa|ce." (in|
|00000640| 74 65 72 61 63 74 69 76 | 65 20 22 2a 22 29 20 28 |teractiv|e "*") (|
|00000650| 62 79 74 65 2d 63 6f 64 | 65 20 22 c0 88 c1 c2 21 |byte-cod|e "....!|
|00000660| 88 67 c3 55 83 12 00 c4 | c5 21 82 14 00 c3 63 88 |.g.U....|.!....c.|
|00000670| c6 60 c7 c2 21 88 60 5c | 22 87 22 20 5b 6e 69 6c |.`..!.`\|"." [nil|
|00000680| 20 73 6b 69 70 2d 63 68 | 61 72 73 2d 62 61 63 6b | skip-ch|ars-back|
|00000690| 77 61 72 64 20 22 20 09 | 22 20 33 32 20 66 6f 72 |ward " .|" 32 for|
|000006a0| 77 61 72 64 2d 63 68 61 | 72 20 31 20 64 65 6c 65 |ward-cha|r 1 dele|
|000006b0| 74 65 2d 72 65 67 69 6f | 6e 20 73 6b 69 70 2d 63 |te-regio|n skip-c|
|000006c0| 68 61 72 73 2d 66 6f 72 | 77 61 72 64 5d 20 36 29 |hars-for|ward] 6)|
|000006d0| 29 0a 0a 28 64 65 66 75 | 6e 20 64 65 6c 65 74 65 |)..(defu|n delete|
|000006e0| 2d 62 6c 61 6e 6b 2d 6c | 69 6e 65 73 20 6e 69 6c |-blank-l|ines nil|
|000006f0| 20 22 5c 0a 4f 6e 20 62 | 6c 61 6e 6b 20 6c 69 6e | "\.On b|lank lin|
|00000700| 65 2c 20 64 65 6c 65 74 | 65 20 61 6c 6c 20 73 75 |e, delet|e all su|
|00000710| 72 72 6f 75 6e 64 69 6e | 67 20 62 6c 61 6e 6b 20 |rroundin|g blank |
|00000720| 6c 69 6e 65 73 2c 20 6c | 65 61 76 69 6e 67 20 6a |lines, l|eaving j|
|00000730| 75 73 74 20 6f 6e 65 2e | 0a 4f 6e 20 69 73 6f 6c |ust one.|.On isol|
|00000740| 61 74 65 64 20 62 6c 61 | 6e 6b 20 6c 69 6e 65 2c |ated bla|nk line,|
|00000750| 20 64 65 6c 65 74 65 20 | 74 68 61 74 20 6f 6e 65 | delete |that one|
|00000760| 2e 0a 4f 6e 20 6e 6f 6e | 62 6c 61 6e 6b 20 6c 69 |..On non|blank li|
|00000770| 6e 65 2c 20 64 65 6c 65 | 74 65 20 61 6c 6c 20 62 |ne, dele|te all b|
|00000780| 6c 61 6e 6b 20 6c 69 6e | 65 73 20 74 68 61 74 20 |lank lin|es that |
|00000790| 66 6f 6c 6c 6f 77 20 69 | 74 2e 22 20 28 69 6e 74 |follow i|t." (int|
|000007a0| 65 72 61 63 74 69 76 65 | 20 22 2a 22 29 20 28 62 |eractive| "*") (b|
|000007b0| 79 74 65 2d 63 6f 64 65 | 20 22 c2 88 c2 c2 19 18 |yte-code| "......|
|000007c0| 8a c4 20 88 c5 c6 21 89 | 10 88 08 85 27 00 c5 c7 |.. ...!.|....'...|
|000007d0| 21 3f 85 27 00 6f 86 27 | 00 c8 c9 21 88 c5 c6 21 |!?.'.o.'|...!...!|
|000007e0| 3f 89 11 29 88 08 85 4e | 00 c4 20 88 09 85 39 00 |?..)...N|.. ...9.|
|000007f0| c8 ca 21 88 cb 60 cc cd | c2 c3 23 83 4c 00 c8 ca |..!..`..|..#.L...|
|00000800| 21 88 60 82 4d 00 65 5c | 22 88 08 85 54 00 09 3f |!.`.M.e\|"...T..?|
|00000810| 85 74 00 8a ce 20 88 c8 | ca 21 88 cb 60 cf cd c2 |.t... ..|.!..`...|
|00000820| c3 23 83 71 00 c4 20 88 | 60 82 72 00 64 5c 22 29 |.#.q.. .|`.r.d\")|
|00000830| 2a 87 22 20 5b 74 68 69 | 73 62 6c 61 6e 6b 20 73 |*." [thi|sblank s|
|00000840| 69 6e 67 6c 65 62 6c 61 | 6e 6b 20 6e 69 6c 20 74 |inglebla|nk nil t|
|00000850| 20 62 65 67 69 6e 6e 69 | 6e 67 2d 6f 66 2d 6c 69 | beginni|ng-of-li|
|00000860| 6e 65 20 6c 6f 6f 6b 69 | 6e 67 2d 61 74 20 22 5b |ne looki|ng-at "[|
|00000870| 20 09 5d 2a 24 22 20 22 | 5b 20 09 5d 2a 0a 5b 20 | .]*$" "|[ .]*.[ |
|00000880| 09 5d 2a 24 22 20 66 6f | 72 77 61 72 64 2d 6c 69 |.]*$" fo|rward-li|
|00000890| 6e 65 20 2d 31 20 31 20 | 64 65 6c 65 74 65 2d 72 |ne -1 1 |delete-r|
|000008a0| 65 67 69 6f 6e 20 72 65 | 2d 73 65 61 72 63 68 2d |egion re|-search-|
|000008b0| 62 61 63 6b 77 61 72 64 | 20 22 5b 5e 20 09 0a 5d |backward| "[^ ..]|
|000008c0| 22 20 65 6e 64 2d 6f 66 | 2d 6c 69 6e 65 20 72 65 |" end-of|-line re|
|000008d0| 2d 73 65 61 72 63 68 2d | 66 6f 72 77 61 72 64 5d |-search-|forward]|
|000008e0| 20 31 38 29 29 0a 0a 28 | 64 65 66 75 6e 20 62 61 | 18))..(|defun ba|
|000008f0| 63 6b 2d 74 6f 2d 69 6e | 64 65 6e 74 61 74 69 6f |ck-to-in|dentatio|
|00000900| 6e 20 6e 69 6c 20 22 5c | 0a 4d 6f 76 65 20 70 6f |n nil "\|.Move po|
|00000910| 69 6e 74 20 74 6f 20 74 | 68 65 20 66 69 72 73 74 |int to t|he first|
|00000920| 20 6e 6f 6e 2d 77 68 69 | 74 65 73 70 61 63 65 20 | non-whi|tespace |
|00000930| 63 68 61 72 61 63 74 65 | 72 20 6f 6e 20 74 68 69 |characte|r on thi|
|00000940| 73 20 6c 69 6e 65 2e 22 | 20 28 69 6e 74 65 72 61 |s line."| (intera|
|00000950| 63 74 69 76 65 29 20 28 | 62 79 74 65 2d 63 6f 64 |ctive) (|byte-cod|
|00000960| 65 20 22 c0 88 c1 c2 21 | 88 c3 c4 21 87 22 20 5b |e "....!|...!." [|
|00000970| 6e 69 6c 20 62 65 67 69 | 6e 6e 69 6e 67 2d 6f 66 |nil begi|nning-of|
|00000980| 2d 6c 69 6e 65 20 31 20 | 73 6b 69 70 2d 63 68 61 |-line 1 |skip-cha|
|00000990| 72 73 2d 66 6f 72 77 61 | 72 64 20 22 20 09 22 5d |rs-forwa|rd " ."]|
|000009a0| 20 33 29 29 0a 0a 28 64 | 65 66 75 6e 20 6e 65 77 | 3))..(d|efun new|
|000009b0| 6c 69 6e 65 2d 61 6e 64 | 2d 69 6e 64 65 6e 74 20 |line-and|-indent |
|000009c0| 6e 69 6c 20 22 5c 0a 49 | 6e 73 65 72 74 20 61 20 |nil "\.I|nsert a |
|000009d0| 6e 65 77 6c 69 6e 65 2c | 20 74 68 65 6e 20 69 6e |newline,| then in|
|000009e0| 64 65 6e 74 20 61 63 63 | 6f 72 64 69 6e 67 20 74 |dent acc|ording t|
|000009f0| 6f 20 6d 61 6a 6f 72 20 | 6d 6f 64 65 2e 0a 49 6e |o major |mode..In|
|00000a00| 64 65 6e 74 61 74 69 6f | 6e 20 69 73 20 64 6f 6e |dentatio|n is don|
|00000a10| 65 20 75 73 69 6e 67 20 | 74 68 65 20 63 75 72 72 |e using |the curr|
|00000a20| 65 6e 74 20 69 6e 64 65 | 6e 74 2d 6c 69 6e 65 2d |ent inde|nt-line-|
|00000a30| 66 75 6e 63 74 69 6f 6e | 2e 0a 49 6e 20 70 72 6f |function|..In pro|
|00000a40| 67 72 61 6d 6d 69 6e 67 | 20 6c 61 6e 67 75 61 67 |gramming| languag|
|00000a50| 65 20 6d 6f 64 65 73 2c | 20 74 68 69 73 20 69 73 |e modes,| this is|
|00000a60| 20 74 68 65 20 73 61 6d | 65 20 61 73 20 54 41 42 | the sam|e as TAB|
|00000a70| 2e 0a 49 6e 20 73 6f 6d | 65 20 74 65 78 74 20 6d |..In som|e text m|
|00000a80| 6f 64 65 73 2c 20 77 68 | 65 72 65 20 54 41 42 20 |odes, wh|ere TAB |
|00000a90| 69 6e 73 65 72 74 73 20 | 61 20 74 61 62 2c 20 74 |inserts |a tab, t|
|00000aa0| 68 69 73 20 69 6e 64 65 | 6e 74 73 20 74 6f 20 74 |his inde|nts to t|
|00000ab0| 68 65 0a 73 70 65 63 69 | 66 69 65 64 20 6c 65 66 |he.speci|fied lef|
|00000ac0| 74 2d 6d 61 72 67 69 6e | 20 63 6f 6c 75 6d 6e 2e |t-margin| column.|
|00000ad0| 22 20 28 69 6e 74 65 72 | 61 63 74 69 76 65 20 22 |" (inter|active "|
|00000ae0| 2a 22 29 20 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |*") (byt|e-code "|
|00000af0| c0 88 c1 60 c2 c3 21 88 | 60 5c 22 88 c4 63 88 c5 |...`..!.|`\"..c..|
|00000b00| 20 87 22 20 5b 6e 69 6c | 20 64 65 6c 65 74 65 2d | ." [nil| delete-|
|00000b10| 72 65 67 69 6f 6e 20 73 | 6b 69 70 2d 63 68 61 72 |region s|kip-char|
|00000b20| 73 2d 62 61 63 6b 77 61 | 72 64 20 22 20 09 22 20 |s-backwa|rd " ." |
|00000b30| 31 30 20 69 6e 64 65 6e | 74 2d 61 63 63 6f 72 64 |10 inden|t-accord|
|00000b40| 69 6e 67 2d 74 6f 2d 6d | 6f 64 65 5d 20 34 29 29 |ing-to-m|ode] 4))|
|00000b50| 0a 0a 28 64 65 66 75 6e | 20 72 65 69 6e 64 65 6e |..(defun| reinden|
|00000b60| 74 2d 74 68 65 6e 2d 6e | 65 77 6c 69 6e 65 2d 61 |t-then-n|ewline-a|
|00000b70| 6e 64 2d 69 6e 64 65 6e | 74 20 6e 69 6c 20 22 5c |nd-inden|t nil "\|
|00000b80| 0a 52 65 69 6e 64 65 6e | 74 20 63 75 72 72 65 6e |.Reinden|t curren|
|00000b90| 74 20 6c 69 6e 65 2c 20 | 69 6e 73 65 72 74 20 6e |t line, |insert n|
|00000ba0| 65 77 6c 69 6e 65 2c 20 | 74 68 65 6e 20 69 6e 64 |ewline, |then ind|
|00000bb0| 65 6e 74 20 74 68 65 20 | 6e 65 77 20 6c 69 6e 65 |ent the |new line|
|00000bc0| 2e 0a 49 6e 64 65 6e 74 | 61 74 69 6f 6e 20 6f 66 |..Indent|ation of|
|00000bd0| 20 62 6f 74 68 20 6c 69 | 6e 65 73 20 69 73 20 64 | both li|nes is d|
|00000be0| 6f 6e 65 20 61 63 63 6f | 72 64 69 6e 67 20 74 6f |one acco|rding to|
|00000bf0| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 6d 61 6a | the cur|rent maj|
|00000c00| 6f 72 20 6d 6f 64 65 2c | 0a 77 68 69 63 68 20 6d |or mode,|.which m|
|00000c10| 65 61 6e 73 20 74 68 61 | 74 20 74 68 65 20 63 75 |eans tha|t the cu|
|00000c20| 72 72 65 6e 74 20 76 61 | 6c 75 65 20 6f 66 20 69 |rrent va|lue of i|
|00000c30| 6e 64 65 6e 74 2d 6c 69 | 6e 65 2d 66 75 6e 63 74 |ndent-li|ne-funct|
|00000c40| 69 6f 6e 20 69 73 20 63 | 61 6c 6c 65 64 2e 0a 49 |ion is c|alled..I|
|00000c50| 6e 20 70 72 6f 67 72 61 | 6d 6d 69 6e 67 20 6c 61 |n progra|mming la|
|00000c60| 6e 67 75 61 67 65 20 6d | 6f 64 65 73 2c 20 74 68 |nguage m|odes, th|
|00000c70| 69 73 20 69 73 20 74 68 | 65 20 73 61 6d 65 20 61 |is is th|e same a|
|00000c80| 73 20 54 41 42 2e 0a 49 | 6e 20 73 6f 6d 65 20 74 |s TAB..I|n some t|
|00000c90| 65 78 74 20 6d 6f 64 65 | 73 2c 20 77 68 65 72 65 |ext mode|s, where|
|00000ca0| 20 54 41 42 20 69 6e 73 | 65 72 74 73 20 61 20 74 | TAB ins|erts a t|
|00000cb0| 61 62 2c 20 74 68 69 73 | 20 69 6e 64 65 6e 74 73 |ab, this| indents|
|00000cc0| 20 74 6f 20 74 68 65 0a | 73 70 65 63 69 66 69 65 | to the.|specifie|
|00000cd0| 64 20 6c 65 66 74 2d 6d | 61 72 67 69 6e 20 63 6f |d left-m|argin co|
|00000ce0| 6c 75 6d 6e 2e 22 20 28 | 69 6e 74 65 72 61 63 74 |lumn." (|interact|
|00000cf0| 69 76 65 20 22 2a 22 29 | 20 28 62 79 74 65 2d 63 |ive "*")| (byte-c|
|00000d00| 6f 64 65 20 22 c0 88 8a | c1 60 c2 c3 21 88 60 5c |ode "...|.`..!.`\|
|00000d10| 22 88 c4 20 29 88 c5 63 | 88 c4 20 87 22 20 5b 6e |".. )..c|.. ." [n|
|00000d20| 69 6c 20 64 65 6c 65 74 | 65 2d 72 65 67 69 6f 6e |il delet|e-region|
|00000d30| 20 73 6b 69 70 2d 63 68 | 61 72 73 2d 62 61 63 6b | skip-ch|ars-back|
|00000d40| 77 61 72 64 20 22 20 09 | 22 20 69 6e 64 65 6e 74 |ward " .|" indent|
|00000d50| 2d 61 63 63 6f 72 64 69 | 6e 67 2d 74 6f 2d 6d 6f |-accordi|ng-to-mo|
|00000d60| 64 65 20 31 30 5d 20 35 | 29 29 0a 0a 28 64 65 66 |de 10] 5|))..(def|
|00000d70| 75 6e 20 6b 69 6c 6c 2d | 66 6f 72 77 61 72 64 2d |un kill-|forward-|
|00000d80| 63 68 61 72 73 20 28 61 | 72 67 29 20 28 62 79 74 |chars (a|rg) (byt|
|00000d90| 65 2d 63 6f 64 65 20 22 | 08 3c 85 09 00 08 40 89 |e-code "|.<....@.|
|00000da0| 10 88 08 c1 3d 85 13 00 | c2 89 10 88 c3 60 60 08 |....=...|.....``.|
|00000db0| 5c 5c 5c 22 87 22 20 5b | 61 72 67 20 2d 20 2d 31 |\\\"." [|arg - -1|
|00000dc0| 20 6b 69 6c 6c 2d 72 65 | 67 69 6f 6e 5d 20 34 29 | kill-re|gion] 4)|
|00000dd0| 29 0a 0a 28 64 65 66 75 | 6e 20 6b 69 6c 6c 2d 62 |)..(defu|n kill-b|
|00000de0| 61 63 6b 77 61 72 64 2d | 63 68 61 72 73 20 28 61 |ackward-|chars (a|
|00000df0| 72 67 29 20 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |rg) (byt|e-code "|
|00000e00| 08 3c 85 09 00 08 40 89 | 10 88 08 c1 3d 85 13 00 |.<....@.|....=...|
|00000e10| c2 89 10 88 c3 60 60 08 | 5a 5c 22 87 22 20 5b 61 |.....``.|Z\"." [a|
|00000e20| 72 67 20 2d 20 2d 31 20 | 6b 69 6c 6c 2d 72 65 67 |rg - -1 |kill-reg|
|00000e30| 69 6f 6e 5d 20 34 29 29 | 0a 0a 28 64 65 66 75 6e |ion] 4))|..(defun|
|00000e40| 20 62 61 63 6b 77 61 72 | 64 2d 64 65 6c 65 74 65 | backwar|d-delete|
|00000e50| 2d 63 68 61 72 2d 75 6e | 74 61 62 69 66 79 20 28 |-char-un|tabify (|
|00000e60| 61 72 67 20 26 6f 70 74 | 69 6f 6e 61 6c 20 6b 69 |arg &opt|ional ki|
|00000e70| 6c 6c 70 29 20 22 5c 0a | 44 65 6c 65 74 65 20 63 |llp) "\.|Delete c|
|00000e80| 68 61 72 61 63 74 65 72 | 73 20 62 61 63 6b 77 61 |haracter|s backwa|
|00000e90| 72 64 2c 20 63 68 61 6e | 67 69 6e 67 20 74 61 62 |rd, chan|ging tab|
|00000ea0| 73 20 69 6e 74 6f 20 73 | 70 61 63 65 73 2e 0a 44 |s into s|paces..D|
|00000eb0| 65 6c 65 74 65 20 41 52 | 47 20 63 68 61 72 73 2c |elete AR|G chars,|
|00000ec0| 20 61 6e 64 20 6b 69 6c | 6c 20 28 73 61 76 65 20 | and kil|l (save |
|00000ed0| 69 6e 20 6b 69 6c 6c 20 | 72 69 6e 67 29 20 69 66 |in kill |ring) if|
|00000ee0| 20 4b 49 4c 4c 50 20 69 | 73 20 6e 6f 6e 2d 6e 69 | KILLP i|s non-ni|
|00000ef0| 6c 2e 0a 49 6e 74 65 72 | 61 63 74 69 76 65 6c 79 |l..Inter|actively|
|00000f00| 2c 20 41 52 47 20 69 73 | 20 74 68 65 20 70 72 65 |, ARG is| the pre|
|00000f10| 66 69 78 20 61 72 67 20 | 28 64 65 66 61 75 6c 74 |fix arg |(default|
|00000f20| 20 31 29 0a 61 6e 64 20 | 4b 49 4c 4c 50 20 69 73 | 1).and |KILLP is|
|00000f30| 20 74 20 69 66 20 70 72 | 65 66 69 78 20 61 72 67 | t if pr|efix arg|
|00000f40| 20 69 73 20 77 61 73 20 | 73 70 65 63 69 66 69 65 | is was |specifie|
|00000f50| 64 2e 22 20 28 69 6e 74 | 65 72 61 63 74 69 76 65 |d." (int|eractive|
|00000f60| 20 22 2a 70 0a 50 22 29 | 20 28 62 79 74 65 2d 63 | "*p.P")| (byte-c|
|00000f70| 6f 64 65 20 22 c4 88 09 | 18 8a 08 c5 56 85 0d 00 |ode "...|....V...|
|00000f80| 6f 3f 85 38 00 68 c6 55 | 85 2b 00 69 1a c7 c8 21 |o?.8.h.U|.+.i...!|
|00000f90| 88 0a 69 5a 89 12 88 c9 | ca 0a 5c 22 88 cb cc 21 |..iZ....|..\"...!|
|00000fa0| 29 88 c7 c8 21 88 08 53 | 89 10 88 82 05 00 29 29 |)...!..S|......))|
|00000fb0| 88 cd 09 0b 5c 22 87 22 | 20 5b 63 6f 75 6e 74 20 |....\"."| [count |
|00000fc0| 61 72 67 20 63 6f 6c 20 | 6b 69 6c 6c 70 20 6e 69 |arg col |killp ni|
|00000fd0| 6c 20 30 20 39 20 66 6f | 72 77 61 72 64 2d 63 68 |l 0 9 fo|rward-ch|
|00000fe0| 61 72 20 2d 31 20 69 6e | 73 65 72 74 2d 63 68 61 |ar -1 in|sert-cha|
|00000ff0| 72 20 33 32 20 64 65 6c | 65 74 65 2d 63 68 61 72 |r 32 del|ete-char|
|00001000| 20 31 20 64 65 6c 65 74 | 65 2d 62 61 63 6b 77 61 | 1 delet|e-backwa|
|00001010| 72 64 2d 63 68 61 72 5d | 20 37 29 29 0a 0a 28 64 |rd-char]| 7))..(d|
|00001020| 65 66 75 6e 20 7a 61 70 | 2d 74 6f 2d 63 68 61 72 |efun zap|-to-char|
|00001030| 20 28 61 72 67 20 63 68 | 61 72 29 20 22 5c 0a 4b | (arg ch|ar) "\.K|
|00001040| 69 6c 6c 20 75 70 20 74 | 6f 20 28 62 75 74 20 6e |ill up t|o (but n|
|00001050| 6f 74 20 69 6e 63 6c 75 | 64 69 6e 67 29 20 41 52 |ot inclu|ding) AR|
|00001060| 47 27 74 68 20 6f 63 63 | 75 72 72 65 6e 63 65 20 |G'th occ|urrence |
|00001070| 6f 66 20 43 48 41 52 2e | 0a 47 6f 65 73 20 62 61 |of CHAR.|.Goes ba|
|00001080| 63 6b 77 61 72 64 20 69 | 66 20 41 52 47 20 69 73 |ckward i|f ARG is|
|00001090| 20 6e 65 67 61 74 69 76 | 65 3b 20 67 6f 65 73 20 | negativ|e; goes |
|000010a0| 74 6f 20 65 6e 64 20 6f | 66 20 62 75 66 66 65 72 |to end o|f buffer|
|000010b0| 20 69 66 20 43 48 41 52 | 20 6e 6f 74 20 66 6f 75 | if CHAR| not fou|
|000010c0| 6e 64 2e 22 20 28 69 6e | 74 65 72 61 63 74 69 76 |nd." (in|teractiv|
|000010d0| 65 20 22 2a 70 0a 63 5a | 61 70 20 74 6f 20 63 68 |e "*p.cZ|ap to ch|
|000010e0| 61 72 3a 20 22 29 20 28 | 62 79 74 65 2d 63 6f 64 |ar: ") (|byte-cod|
|000010f0| 65 20 22 c1 88 c4 60 c5 | c6 08 21 c1 c2 0b 24 83 |e "...`.|..!...$.|
|00001100| 5c 22 00 0b c7 56 83 1a | 00 60 53 82 1c 00 60 54 |\"...V..|.`S...`T|
|00001110| 62 88 60 82 2d 00 0b c7 | 56 83 2c 00 64 82 2d 00 |b.`.-...|V.,.d.-.|
|00001120| 65 5c 22 87 22 20 5b 63 | 68 61 72 20 6e 69 6c 20 |e\"." [c|har nil |
|00001130| 74 20 61 72 67 20 6b 69 | 6c 6c 2d 72 65 67 69 6f |t arg ki|ll-regio|
|00001140| 6e 20 73 65 61 72 63 68 | 2d 66 6f 72 77 61 72 64 |n search|-forward|
|00001150| 20 63 68 61 72 2d 74 6f | 2d 73 74 72 69 6e 67 20 | char-to|-string |
|00001160| 30 5d 20 38 29 29 0a 0a | 28 64 65 66 75 6e 20 62 |0] 8))..|(defun b|
|00001170| 65 67 69 6e 6e 69 6e 67 | 2d 6f 66 2d 62 75 66 66 |eginning|-of-buff|
|00001180| 65 72 20 28 26 6f 70 74 | 69 6f 6e 61 6c 20 61 72 |er (&opt|ional ar|
|00001190| 67 29 20 22 5c 0a 4d 6f | 76 65 20 70 6f 69 6e 74 |g) "\.Mo|ve point|
|000011a0| 20 74 6f 20 74 68 65 20 | 62 65 67 69 6e 6e 69 6e | to the |beginnin|
|000011b0| 67 20 6f 66 20 74 68 65 | 20 62 75 66 66 65 72 3b |g of the| buffer;|
|000011c0| 20 6c 65 61 76 65 20 6d | 61 72 6b 20 61 74 20 70 | leave m|ark at p|
|000011d0| 72 65 76 69 6f 75 73 20 | 70 6f 73 69 74 69 6f 6e |revious |position|
|000011e0| 2e 0a 57 69 74 68 20 61 | 72 67 20 4e 2c 20 70 75 |..With a|rg N, pu|
|000011f0| 74 20 70 6f 69 6e 74 20 | 4e 2f 31 30 20 6f 66 20 |t point |N/10 of |
|00001200| 74 68 65 20 77 61 79 20 | 66 72 6f 6d 20 74 68 65 |the way |from the|
|00001210| 20 74 72 75 65 20 62 65 | 67 69 6e 6e 69 6e 67 2e | true be|ginning.|
|00001220| 0a 44 6f 6e 27 74 20 75 | 73 65 20 74 68 69 73 20 |.Don't u|se this |
|00001230| 69 6e 20 4c 69 73 70 20 | 70 72 6f 67 72 61 6d 73 |in Lisp |programs|
|00001240| 21 0a 28 67 6f 74 6f 2d | 63 68 61 72 20 28 70 6f |!.(goto-|char (po|
|00001250| 69 6e 74 2d 6d 69 6e 29 | 29 20 69 73 20 66 61 73 |int-min)|) is fas|
|00001260| 74 65 72 20 61 6e 64 20 | 64 6f 65 73 20 6e 6f 74 |ter and |does not|
|00001270| 20 73 65 74 20 74 68 65 | 20 6d 61 72 6b 2e 22 20 | set the| mark." |
|00001280| 28 69 6e 74 65 72 61 63 | 74 69 76 65 20 22 50 22 |(interac|tive "P"|
|00001290| 29 20 28 62 79 74 65 2d | 63 6f 64 65 20 22 c1 88 |) (byte-|code "..|
|000012a0| c2 20 88 08 83 2c 00 c3 | 20 c4 56 83 1d 00 c5 c6 |. ...,..| .V.....|
|000012b0| 08 21 c7 c3 20 c8 5c 22 | 5c 22 82 29 00 c7 c8 c5 |.!.. .\"|\".)....|
|000012c0| c3 20 c6 08 21 5c 22 5c | 5c c8 5c 22 82 2d 00 65 |. ..!\"\|\.\".-.e|
|000012d0| 62 88 08 85 36 00 c9 ca | 21 87 22 20 5b 61 72 67 |b...6...|!." [arg|
|000012e0| 20 6e 69 6c 20 70 75 73 | 68 2d 6d 61 72 6b 20 62 | nil pus|h-mark b|
|000012f0| 75 66 66 65 72 2d 73 69 | 7a 65 20 31 30 30 30 30 |uffer-si|ze 10000|
|00001300| 20 2a 20 70 72 65 66 69 | 78 2d 6e 75 6d 65 72 69 | * prefi|x-numeri|
|00001310| 63 2d 76 61 6c 75 65 20 | 2f 20 31 30 20 66 6f 72 |c-value |/ 10 for|
|00001320| 77 61 72 64 2d 6c 69 6e | 65 20 31 5d 20 31 33 29 |ward-lin|e 1] 13)|
|00001330| 29 0a 0a 28 64 65 66 75 | 6e 20 65 6e 64 2d 6f 66 |)..(defu|n end-of|
|00001340| 2d 62 75 66 66 65 72 20 | 28 26 6f 70 74 69 6f 6e |-buffer |(&option|
|00001350| 61 6c 20 61 72 67 29 20 | 22 5c 0a 4d 6f 76 65 20 |al arg) |"\.Move |
|00001360| 70 6f 69 6e 74 20 74 6f | 20 74 68 65 20 65 6e 64 |point to| the end|
|00001370| 20 6f 66 20 74 68 65 20 | 62 75 66 66 65 72 3b 20 | of the |buffer; |
|00001380| 6c 65 61 76 65 20 6d 61 | 72 6b 20 61 74 20 70 72 |leave ma|rk at pr|
|00001390| 65 76 69 6f 75 73 20 70 | 6f 73 69 74 69 6f 6e 2e |evious p|osition.|
|000013a0| 0a 57 69 74 68 20 61 72 | 67 20 4e 2c 20 70 75 74 |.With ar|g N, put|
|000013b0| 20 70 6f 69 6e 74 20 4e | 2f 31 30 20 6f 66 20 74 | point N|/10 of t|
|000013c0| 68 65 20 77 61 79 20 66 | 72 6f 6d 20 74 68 65 20 |he way f|rom the |
|000013d0| 74 72 75 65 20 65 6e 64 | 2e 0a 44 6f 6e 27 74 20 |true end|..Don't |
|000013e0| 75 73 65 20 74 68 69 73 | 20 69 6e 20 4c 69 73 70 |use this| in Lisp|
|000013f0| 20 70 72 6f 67 72 61 6d | 73 21 0a 28 67 6f 74 6f | program|s!.(goto|
|00001400| 2d 63 68 61 72 20 28 70 | 6f 69 6e 74 2d 6d 61 78 |-char (p|oint-max|
|00001410| 29 29 20 69 73 20 66 61 | 73 74 65 72 20 61 6e 64 |)) is fa|ster and|
|00001420| 20 64 6f 65 73 20 6e 6f | 74 20 73 65 74 20 74 68 | does no|t set th|
|00001430| 65 20 6d 61 72 6b 2e 22 | 20 28 69 6e 74 65 72 61 |e mark."| (intera|
|00001440| 63 74 69 76 65 20 22 50 | 22 29 20 28 62 79 74 65 |ctive "P|") (byte|
|00001450| 2d 63 6f 64 65 20 22 c1 | 88 c2 20 88 08 83 2e 00 |-code ".|.. .....|
|00001460| c3 20 54 c3 20 c4 56 83 | 20 00 c5 c6 08 21 c7 c3 |. T. .V.| ....!..|
|00001470| 20 c8 5c 22 5c 22 82 2a | 00 c7 c5 c3 20 c6 08 21 | .\"\".*|.... ..!|
|00001480| 5c 22 c8 5c 22 5a 82 2f | 00 64 62 88 08 85 38 00 |\".\"Z./|.db...8.|
|00001490| c9 ca 21 87 22 20 5b 61 | 72 67 20 6e 69 6c 20 70 |..!." [a|rg nil p|
|000014a0| 75 73 68 2d 6d 61 72 6b | 20 62 75 66 66 65 72 2d |ush-mark| buffer-|
|000014b0| 73 69 7a 65 20 31 30 30 | 30 30 20 2a 20 70 72 65 |size 100|00 * pre|
|000014c0| 66 69 78 2d 6e 75 6d 65 | 72 69 63 2d 76 61 6c 75 |fix-nume|ric-valu|
|000014d0| 65 20 2f 20 31 30 20 66 | 6f 72 77 61 72 64 2d 6c |e / 10 f|orward-l|
|000014e0| 69 6e 65 20 31 5d 20 31 | 34 29 29 0a 0a 28 64 65 |ine 1] 1|4))..(de|
|000014f0| 66 75 6e 20 6d 61 72 6b | 2d 77 68 6f 6c 65 2d 62 |fun mark|-whole-b|
|00001500| 75 66 66 65 72 20 6e 69 | 6c 20 22 5c 0a 50 75 74 |uffer ni|l "\.Put|
|00001510| 20 70 6f 69 6e 74 20 61 | 74 20 62 65 67 69 6e 6e | point a|t beginn|
|00001520| 69 6e 67 20 61 6e 64 20 | 6d 61 72 6b 20 61 74 20 |ing and |mark at |
|00001530| 65 6e 64 20 6f 66 20 62 | 75 66 66 65 72 2e 22 20 |end of b|uffer." |
|00001540| 28 69 6e 74 65 72 61 63 | 74 69 76 65 29 20 28 62 |(interac|tive) (b|
|00001550| 79 74 65 2d 63 6f 64 65 | 20 22 c0 88 c1 60 21 88 |yte-code| "...`!.|
|00001560| c1 64 21 88 65 62 87 22 | 20 5b 6e 69 6c 20 70 75 |.d!.eb."| [nil pu|
|00001570| 73 68 2d 6d 61 72 6b 5d | 20 33 29 29 0a 0a 28 64 |sh-mark]| 3))..(d|
|00001580| 65 66 75 6e 20 63 6f 75 | 6e 74 2d 6c 69 6e 65 73 |efun cou|nt-lines|
|00001590| 2d 72 65 67 69 6f 6e 20 | 28 73 74 61 72 74 20 65 |-region |(start e|
|000015a0| 6e 64 29 20 22 5c 0a 50 | 72 69 6e 74 20 6e 75 6d |nd) "\.P|rint num|
|000015b0| 62 65 72 20 6f 66 20 6c | 69 6e 65 73 20 69 6e 20 |ber of l|ines in |
|000015c0| 74 68 65 20 72 65 67 69 | 6f 6e 2e 22 20 28 69 6e |the regi|on." (in|
|000015d0| 74 65 72 61 63 74 69 76 | 65 20 22 72 22 29 20 28 |teractiv|e "r") (|
|000015e0| 62 79 74 65 2d 63 6f 64 | 65 20 22 c2 88 c3 c4 c5 |byte-cod|e ".....|
|000015f0| 08 09 5c 22 5c 22 87 22 | 20 5b 73 74 61 72 74 20 |..\"\"."| [start |
|00001600| 65 6e 64 20 6e 69 6c 20 | 6d 65 73 73 61 67 65 20 |end nil |message |
|00001610| 22 52 65 67 69 6f 6e 20 | 68 61 73 20 25 64 20 6c |"Region |has %d l|
|00001620| 69 6e 65 73 22 20 63 6f | 75 6e 74 2d 6c 69 6e 65 |ines" co|unt-line|
|00001630| 73 5d 20 35 29 29 0a 0a | 28 64 65 66 75 6e 20 77 |s] 5))..|(defun w|
|00001640| 68 61 74 2d 6c 69 6e 65 | 20 6e 69 6c 20 22 5c 0a |hat-line| nil "\.|
|00001650| 50 72 69 6e 74 20 74 68 | 65 20 63 75 72 72 65 6e |Print th|e curren|
|00001660| 74 20 6c 69 6e 65 20 6e | 75 6d 62 65 72 20 28 69 |t line n|umber (i|
|00001670| 6e 20 74 68 65 20 62 75 | 66 66 65 72 29 20 6f 66 |n the bu|ffer) of|
|00001680| 20 70 6f 69 6e 74 2e 22 | 20 28 69 6e 74 65 72 61 | point."| (intera|
|00001690| 63 74 69 76 65 29 20 28 | 62 79 74 65 2d 63 6f 64 |ctive) (|byte-cod|
|000016a0| 65 20 22 c0 88 8c c1 20 | 88 8a c2 20 88 c3 c4 c5 |e ".... |... ....|
|000016b0| c6 60 5c 22 54 5c 22 29 | 29 87 22 20 5b 6e 69 6c |.`\"T\")|)." [nil|
|000016c0| 20 77 69 64 65 6e 20 62 | 65 67 69 6e 6e 69 6e 67 | widen b|eginning|
|000016d0| 2d 6f 66 2d 6c 69 6e 65 | 20 6d 65 73 73 61 67 65 |-of-line| message|
|000016e0| 20 22 4c 69 6e 65 20 25 | 64 22 20 63 6f 75 6e 74 | "Line %|d" count|
|000016f0| 2d 6c 69 6e 65 73 20 31 | 5d 20 37 29 29 0a 0a 28 |-lines 1|] 7))..(|
|00001700| 64 65 66 75 6e 20 63 6f | 75 6e 74 2d 6c 69 6e 65 |defun co|unt-line|
|00001710| 73 20 28 73 74 61 72 74 | 20 65 6e 64 29 20 22 5c |s (start| end) "\|
|00001720| 0a 52 65 74 75 72 6e 20 | 6e 75 6d 62 65 72 20 6f |.Return |number o|
|00001730| 66 20 6e 65 77 6c 69 6e | 65 73 20 62 65 74 77 65 |f newlin|es betwe|
|00001740| 65 6e 20 53 54 41 52 54 | 20 61 6e 64 20 45 4e 44 |en START| and END|
|00001750| 2e 22 20 28 62 79 74 65 | 2d 63 6f 64 65 20 22 8a |." (byte|-code ".|
|00001760| 8c c2 08 09 5c 22 88 65 | 62 88 c3 20 c4 c3 20 21 |....\".e|b.. .. !|
|00001770| 5a 29 29 87 22 20 5b 73 | 74 61 72 74 20 65 6e 64 |Z))." [s|tart end|
|00001780| 20 6e 61 72 72 6f 77 2d | 74 6f 2d 72 65 67 69 6f | narrow-|to-regio|
|00001790| 6e 20 62 75 66 66 65 72 | 2d 73 69 7a 65 20 66 6f |n buffer|-size fo|
|000017a0| 72 77 61 72 64 2d 6c 69 | 6e 65 5d 20 36 29 29 0a |rward-li|ne] 6)).|
|000017b0| 0a 28 64 65 66 75 6e 20 | 77 68 61 74 2d 63 75 72 |.(defun |what-cur|
|000017c0| 73 6f 72 2d 70 6f 73 69 | 74 69 6f 6e 20 6e 69 6c |sor-posi|tion nil|
|000017d0| 20 22 5c 0a 50 72 69 6e | 74 20 69 6e 66 6f 20 6f | "\.Prin|t info o|
|000017e0| 6e 20 63 75 72 73 6f 72 | 20 70 6f 73 69 74 69 6f |n cursor| positio|
|000017f0| 6e 20 28 6f 6e 20 73 63 | 72 65 65 6e 20 61 6e 64 |n (on sc|reen and|
|00001800| 20 77 69 74 68 69 6e 20 | 62 75 66 66 65 72 29 2e | within |buffer).|
|00001810| 22 20 28 69 6e 74 65 72 | 61 63 74 69 76 65 29 20 |" (inter|active) |
|00001820| 28 62 79 74 65 2d 63 6f | 64 65 20 22 c8 88 67 18 |(byte-co|de "..g.|
|00001830| 65 19 64 1a 60 1b c9 20 | 1c 0c ca 56 83 25 00 cb |e.d.`.. |...V.%..|
|00001840| cb 0c cc 5c 22 0b 53 5c | 5c cb 0c cd 5c 22 ce 5d |...\".S\|\...\".]|
|00001850| 5c 22 82 34 00 cb cb 0c | cf 5c 22 d0 cd 0b 53 5c |\".4....|.\"...S\|
|00001860| 22 5c 5c 0c ce 5d 5c 22 | 1d d1 20 d2 55 83 40 00 |"\\..]\"|.. .U.@.|
|00001870| d3 82 45 00 d4 d5 d1 20 | 5c 22 1e 06 69 1e 07 0b |..E.... |\"..i...|
|00001880| 0a 55 83 7d 00 d6 09 ce | 5c 22 86 5c 5c 00 d6 0a |.U.}....|\".\\...|
|00001890| 0c 54 5c 22 83 6f 00 d7 | d8 0b 0c 0d 09 0a 0e 07 |.T\".o..|........|
|000018a0| 0e 06 26 08 82 7a 00 d7 | d9 0b 0c 0d 0e 07 0e 06 |..&..z..|........|
|000018b0| 26 06 82 af 00 d6 09 ce | 5c 22 86 89 00 d6 0a 0c |&.......|\"......|
|000018c0| 54 5c 22 83 a0 00 d7 da | db 08 21 08 0b 0c 0d 09 |T\".....|..!.....|
|000018d0| 0a 0e 07 0e 06 26 0a 82 | af 00 d7 dc db 08 21 08 |.....&..|......!.|
|000018e0| 0b 0c 0d 0e 07 0e 06 26 | 08 2e 08 87 22 20 5b 63 |.......&|...." [c|
|000018f0| 68 61 72 20 62 65 67 20 | 65 6e 64 20 70 6f 73 20 |har beg |end pos |
|00001900| 74 6f 74 61 6c 20 70 65 | 72 63 65 6e 74 20 68 73 |total pe|rcent hs|
|00001910| 63 72 6f 6c 6c 20 63 6f | 6c 20 6e 69 6c 20 62 75 |croll co|l nil bu|
|00001920| 66 66 65 72 2d 73 69 7a | 65 20 35 30 30 30 30 20 |ffer-siz|e 50000 |
|00001930| 2f 20 32 30 30 20 31 30 | 30 20 31 20 32 20 2a 20 |/ 200 10|0 1 2 * |
|00001940| 77 69 6e 64 6f 77 2d 68 | 73 63 72 6f 6c 6c 20 30 |window-h|scroll 0|
|00001950| 20 22 22 20 66 6f 72 6d | 61 74 20 22 20 48 73 63 | "" form|at " Hsc|
|00001960| 72 6f 6c 6c 3d 25 64 22 | 20 2f 3d 20 6d 65 73 73 |roll=%d"| /= mess|
|00001970| 61 67 65 20 22 70 6f 69 | 6e 74 3d 25 64 20 6f 66 |age "poi|nt=%d of|
|00001980| 20 25 64 28 25 64 25 25 | 29 20 3c 25 64 20 2d 20 | %d(%d%%|) <%d - |
|00001990| 25 64 3e 20 20 63 6f 6c | 75 6d 6e 20 25 64 20 25 |%d> col|umn %d %|
|000019a0| 73 22 20 22 70 6f 69 6e | 74 3d 25 64 20 6f 66 20 |s" "poin|t=%d of |
|000019b0| 25 64 28 25 64 25 25 29 | 20 20 63 6f 6c 75 6d 6e |%d(%d%%)| column|
|000019c0| 20 25 64 20 25 73 22 20 | 22 43 68 61 72 3a 20 25 | %d %s" |"Char: %|
|000019d0| 73 20 28 30 25 6f 29 20 | 20 70 6f 69 6e 74 3d 25 |s (0%o) | point=%|
|000019e0| 64 20 6f 66 20 25 64 28 | 25 64 25 25 29 20 3c 25 |d of %d(|%d%%) <%|
|000019f0| 64 20 2d 20 25 64 3e 20 | 20 63 6f 6c 75 6d 6e 20 |d - %d> | column |
|00001a00| 25 64 20 25 73 22 20 73 | 69 6e 67 6c 65 2d 6b 65 |%d %s" s|ingle-ke|
|00001a10| 79 2d 64 65 73 63 72 69 | 70 74 69 6f 6e 20 22 43 |y-descri|ption "C|
|00001a20| 68 61 72 3a 20 25 73 20 | 28 30 25 6f 29 20 20 70 |har: %s |(0%o) p|
|00001a30| 6f 69 6e 74 3d 25 64 20 | 6f 66 20 25 64 28 25 64 |oint=%d |of %d(%d|
|00001a40| 25 25 29 20 20 63 6f 6c | 75 6d 6e 20 25 64 20 25 |%%) col|umn %d %|
|00001a50| 73 22 5d 20 32 38 29 29 | 0a 0a 28 64 65 66 75 6e |s"] 28))|..(defun|
|00001a60| 20 66 75 6e 64 61 6d 65 | 6e 74 61 6c 2d 6d 6f 64 | fundame|ntal-mod|
|00001a70| 65 20 6e 69 6c 20 22 5c | 0a 4d 61 6a 6f 72 20 6d |e nil "\|.Major m|
|00001a80| 6f 64 65 20 6e 6f 74 20 | 73 70 65 63 69 61 6c 69 |ode not |speciali|
|00001a90| 7a 65 64 20 66 6f 72 20 | 61 6e 79 74 68 69 6e 67 |zed for |anything|
|00001aa0| 20 69 6e 20 70 61 72 74 | 69 63 75 6c 61 72 2e 0a | in part|icular..|
|00001ab0| 4f 74 68 65 72 20 6d 61 | 6a 6f 72 20 6d 6f 64 65 |Other ma|jor mode|
|00001ac0| 73 20 61 72 65 20 64 65 | 66 69 6e 65 64 20 62 79 |s are de|fined by|
|00001ad0| 20 63 6f 6d 70 61 72 69 | 73 6f 6e 20 77 69 74 68 | compari|son with|
|00001ae0| 20 74 68 69 73 20 6f 6e | 65 2e 22 20 28 69 6e 74 | this on|e." (int|
|00001af0| 65 72 61 63 74 69 76 65 | 29 20 28 62 79 74 65 2d |eractive|) (byte-|
|00001b00| 63 6f 64 65 20 22 c0 88 | c1 20 87 22 20 5b 6e 69 |code "..|. ." [ni|
|00001b10| 6c 20 6b 69 6c 6c 2d 61 | 6c 6c 2d 6c 6f 63 61 6c |l kill-a|ll-local|
|00001b20| 2d 76 61 72 69 61 62 6c | 65 73 5d 20 32 29 29 0a |-variabl|es] 2)).|
|00001b30| 0a 28 70 75 74 20 28 71 | 75 6f 74 65 20 65 76 61 |.(put (q|uote eva|
|00001b40| 6c 2d 65 78 70 72 65 73 | 73 69 6f 6e 29 20 28 71 |l-expres|sion) (q|
|00001b50| 75 6f 74 65 20 64 69 73 | 61 62 6c 65 64 29 20 74 |uote dis|abled) t|
|00001b60| 29 0a 0a 28 64 65 66 75 | 6e 20 65 76 61 6c 2d 65 |)..(defu|n eval-e|
|00001b70| 78 70 72 65 73 73 69 6f | 6e 20 28 65 78 70 72 65 |xpressio|n (expre|
|00001b80| 73 73 69 6f 6e 29 20 22 | 5c 0a 45 76 61 6c 75 61 |ssion) "|\.Evalua|
|00001b90| 74 65 20 45 58 50 52 45 | 53 53 49 4f 4e 20 61 6e |te EXPRE|SSION an|
|00001ba0| 64 20 70 72 69 6e 74 20 | 76 61 6c 75 65 20 69 6e |d print |value in|
|00001bb0| 20 6d 69 6e 69 62 75 66 | 66 65 72 2e 0a 56 61 6c | minibuf|fer..Val|
|00001bc0| 75 65 20 69 73 20 61 6c | 73 6f 20 63 6f 6e 73 65 |ue is al|so conse|
|00001bd0| 64 20 6f 6e 20 74 6f 20 | 66 72 6f 6e 74 20 6f 66 |d on to |front of|
|00001be0| 20 76 61 72 69 61 62 6c | 65 20 20 76 61 6c 75 65 | variabl|e value|
|00001bf0| 73 20 20 27 73 20 76 61 | 6c 75 65 2e 22 20 28 69 |s 's va|lue." (i|
|00001c00| 6e 74 65 72 61 63 74 69 | 76 65 20 22 78 45 76 61 |nteracti|ve "xEva|
|00001c10| 6c 3a 20 22 29 20 28 62 | 79 74 65 2d 63 6f 64 65 |l: ") (b|yte-code|
|00001c20| 20 22 c3 88 c4 09 21 08 | 42 89 10 88 c5 08 40 c2 | "....!.|B.....@.|
|00001c30| 5c 22 87 22 20 5b 76 61 | 6c 75 65 73 20 65 78 70 |\"." [va|lues exp|
|00001c40| 72 65 73 73 69 6f 6e 20 | 74 20 6e 69 6c 20 65 76 |ression |t nil ev|
|00001c50| 61 6c 20 70 72 69 6e 31 | 5d 20 34 29 29 0a 0a 28 |al prin1|] 4))..(|
|00001c60| 64 65 66 75 6e 20 65 64 | 69 74 2d 61 6e 64 2d 65 |defun ed|it-and-e|
|00001c70| 76 61 6c 2d 63 6f 6d 6d | 61 6e 64 20 28 70 72 6f |val-comm|and (pro|
|00001c80| 6d 70 74 20 63 6f 6d 6d | 61 6e 64 29 20 22 5c 0a |mpt comm|and) "\.|
|00001c90| 50 72 6f 6d 70 74 69 6e | 67 20 77 69 74 68 20 50 |Promptin|g with P|
|00001ca0| 52 4f 4d 50 54 2c 20 6c | 65 74 20 75 73 65 72 20 |ROMPT, l|et user |
|00001cb0| 65 64 69 74 20 43 4f 4d | 4d 41 4e 44 20 61 6e 64 |edit COM|MAND and|
|00001cc0| 20 65 76 61 6c 20 72 65 | 73 75 6c 74 2e 0a 43 4f | eval re|sult..CO|
|00001cd0| 4d 4d 41 4e 44 20 69 73 | 20 61 20 4c 69 73 70 20 |MMAND is| a Lisp |
|00001ce0| 65 78 70 72 65 73 73 69 | 6f 6e 2e 20 20 4c 65 74 |expressi|on. Let|
|00001cf0| 20 75 73 65 72 20 65 64 | 69 74 20 74 68 61 74 20 | user ed|it that |
|00001d00| 65 78 70 72 65 73 73 69 | 6f 6e 20 69 6e 0a 74 68 |expressi|on in.th|
|00001d10| 65 20 6d 69 6e 69 62 75 | 66 66 65 72 2c 20 74 68 |e minibu|ffer, th|
|00001d20| 65 6e 20 72 65 61 64 20 | 61 6e 64 20 65 76 61 6c |en read |and eval|
|00001d30| 75 61 74 65 20 74 68 65 | 20 72 65 73 75 6c 74 2e |uate the| result.|
|00001d40| 22 20 28 62 79 74 65 2d | 63 6f 64 65 20 22 c2 c3 |" (byte-|code "..|
|00001d50| 08 c4 09 21 5c 22 21 87 | 22 20 5b 70 72 6f 6d 70 |...!\"!.|" [promp|
|00001d60| 74 20 63 6f 6d 6d 61 6e | 64 20 65 76 61 6c 20 72 |t comman|d eval r|
|00001d70| 65 61 64 2d 6d 69 6e 69 | 62 75 66 66 65 72 20 70 |ead-mini|buffer p|
|00001d80| 72 69 6e 31 2d 74 6f 2d | 73 74 72 69 6e 67 5d 20 |rin1-to-|string] |
|00001d90| 35 29 29 0a 0a 28 64 65 | 66 76 61 72 20 72 65 70 |5))..(de|fvar rep|
|00001da0| 65 61 74 2d 63 6f 6d 70 | 6c 65 78 2d 63 6f 6d 6d |eat-comp|lex-comm|
|00001db0| 61 6e 64 2d 6d 61 70 20 | 28 63 6f 70 79 2d 61 6c |and-map |(copy-al|
|00001dc0| 69 73 74 20 6d 69 6e 69 | 62 75 66 66 65 72 2d 6c |ist mini|buffer-l|
|00001dd0| 6f 63 61 6c 2d 6d 61 70 | 29 29 0a 0a 28 64 65 66 |ocal-map|))..(def|
|00001de0| 69 6e 65 2d 6b 65 79 20 | 72 65 70 65 61 74 2d 63 |ine-key |repeat-c|
|00001df0| 6f 6d 70 6c 65 78 2d 63 | 6f 6d 6d 61 6e 64 2d 6d |omplex-c|ommand-m|
|00001e00| 61 70 20 22 1b 70 22 20 | 28 71 75 6f 74 65 20 70 |ap ".p" |(quote p|
|00001e10| 72 65 76 69 6f 75 73 2d | 63 6f 6d 70 6c 65 78 2d |revious-|complex-|
|00001e20| 63 6f 6d 6d 61 6e 64 29 | 29 0a 0a 28 64 65 66 69 |command)|)..(defi|
|00001e30| 6e 65 2d 6b 65 79 20 72 | 65 70 65 61 74 2d 63 6f |ne-key r|epeat-co|
|00001e40| 6d 70 6c 65 78 2d 63 6f | 6d 6d 61 6e 64 2d 6d 61 |mplex-co|mmand-ma|
|00001e50| 70 20 22 1b 6e 22 20 28 | 71 75 6f 74 65 20 6e 65 |p ".n" (|quote ne|
|00001e60| 78 74 2d 63 6f 6d 70 6c | 65 78 2d 63 6f 6d 6d 61 |xt-compl|ex-comma|
|00001e70| 6e 64 29 29 0a 0a 28 64 | 65 66 75 6e 20 72 65 70 |nd))..(d|efun rep|
|00001e80| 65 61 74 2d 63 6f 6d 70 | 6c 65 78 2d 63 6f 6d 6d |eat-comp|lex-comm|
|00001e90| 61 6e 64 20 28 72 65 70 | 65 61 74 2d 63 6f 6d 70 |and (rep|eat-comp|
|00001ea0| 6c 65 78 2d 63 6f 6d 6d | 61 6e 64 2d 61 72 67 29 |lex-comm|and-arg)|
|00001eb0| 20 22 5c 0a 45 64 69 74 | 20 61 6e 64 20 72 65 2d | "\.Edit| and re-|
|00001ec0| 65 76 61 6c 75 61 74 65 | 20 6c 61 73 74 20 63 6f |evaluate| last co|
|00001ed0| 6d 70 6c 65 78 20 63 6f | 6d 6d 61 6e 64 2c 20 6f |mplex co|mmand, o|
|00001ee0| 72 20 41 52 47 74 68 20 | 66 72 6f 6d 20 6c 61 73 |r ARGth |from las|
|00001ef0| 74 2e 0a 41 20 63 6f 6d | 70 6c 65 78 20 63 6f 6d |t..A com|plex com|
|00001f00| 6d 61 6e 64 20 69 73 20 | 6f 6e 65 20 77 68 69 63 |mand is |one whic|
|00001f10| 68 20 75 73 65 64 20 74 | 68 65 20 6d 69 6e 69 62 |h used t|he minib|
|00001f20| 75 66 66 65 72 2e 0a 54 | 68 65 20 63 6f 6d 6d 61 |uffer..T|he comma|
|00001f30| 6e 64 20 69 73 20 70 6c | 61 63 65 64 20 69 6e 20 |nd is pl|aced in |
|00001f40| 74 68 65 20 6d 69 6e 69 | 62 75 66 66 65 72 20 61 |the mini|buffer a|
|00001f50| 73 20 61 20 4c 69 73 70 | 20 66 6f 72 6d 20 66 6f |s a Lisp| form fo|
|00001f60| 72 20 65 64 69 74 69 6e | 67 2e 0a 54 68 65 20 72 |r editin|g..The r|
|00001f70| 65 73 75 6c 74 20 69 73 | 20 65 78 65 63 75 74 65 |esult is| execute|
|00001f80| 64 2c 20 72 65 70 65 61 | 74 69 6e 67 20 74 68 65 |d, repea|ting the|
|00001f90| 20 63 6f 6d 6d 61 6e 64 | 20 61 73 20 63 68 61 6e | command| as chan|
|00001fa0| 67 65 64 2e 0a 49 66 20 | 74 68 65 20 63 6f 6d 6d |ged..If |the comm|
|00001fb0| 61 6e 64 20 68 61 73 20 | 62 65 65 6e 20 63 68 61 |and has |been cha|
|00001fc0| 6e 67 65 64 20 6f 72 20 | 69 73 20 6e 6f 74 20 74 |nged or |is not t|
|00001fd0| 68 65 20 6d 6f 73 74 20 | 72 65 63 65 6e 74 20 70 |he most |recent p|
|00001fe0| 72 65 76 69 6f 75 73 20 | 63 6f 6d 6d 61 6e 64 0a |revious |command.|
|00001ff0| 69 74 20 69 73 20 61 64 | 64 65 64 20 74 6f 20 74 |it is ad|ded to t|
|00002000| 68 65 20 66 72 6f 6e 74 | 20 6f 66 20 74 68 65 20 |he front| of the |
|00002010| 63 6f 6d 6d 61 6e 64 20 | 68 69 73 74 6f 72 79 2e |command |history.|
|00002020| 0a 57 68 69 6c 73 74 20 | 65 64 69 74 69 6e 67 20 |.Whilst |editing |
|00002030| 74 68 65 20 63 6f 6d 6d | 61 6e 64 2c 20 74 68 65 |the comm|and, the|
|00002040| 20 66 6f 6c 6c 6f 77 69 | 6e 67 20 63 6f 6d 6d 61 | followi|ng comma|
|00002050| 6e 64 73 20 61 72 65 20 | 61 76 61 69 6c 61 62 6c |nds are |availabl|
|00002060| 65 3a 0a 5c 5c 7b 72 65 | 70 65 61 74 2d 63 6f 6d |e:.\\{re|peat-com|
|00002070| 70 6c 65 78 2d 63 6f 6d | 6d 61 6e 64 2d 6d 61 70 |plex-com|mand-map|
|00002080| 7d 22 20 28 69 6e 74 65 | 72 61 63 74 69 76 65 20 |}" (inte|ractive |
|00002090| 22 70 22 29 20 28 62 79 | 74 65 2d 63 6f 64 65 20 |"p") (by|te-code |
|000020a0| 22 c6 88 09 53 0a 38 c6 | 1b 18 08 83 2c 00 c7 c8 |"...S.8.|....,...|
|000020b0| c9 08 21 0c c5 24 89 13 | 88 ca 0b 0a 40 5c 22 86 |..!..$..|....@\".|
|000020c0| 25 00 0b 0a 42 89 12 88 | cb 0b 21 82 2e 00 cc 20 |%...B...|..!.... |
|000020d0| 2a 87 22 20 5b 65 6c 74 | 20 72 65 70 65 61 74 2d |*." [elt| repeat-|
|000020e0| 63 6f 6d 70 6c 65 78 2d | 63 6f 6d 6d 61 6e 64 2d |complex-|command-|
|000020f0| 61 72 67 20 63 6f 6d 6d | 61 6e 64 2d 68 69 73 74 |arg comm|and-hist|
|00002100| 6f 72 79 20 6e 65 77 63 | 6d 64 20 72 65 70 65 61 |ory newc|md repea|
|00002110| 74 2d 63 6f 6d 70 6c 65 | 78 2d 63 6f 6d 6d 61 6e |t-comple|x-comman|
|00002120| 64 2d 6d 61 70 20 74 20 | 6e 69 6c 20 72 65 61 64 |d-map t |nil read|
|00002130| 2d 66 72 6f 6d 2d 6d 69 | 6e 69 62 75 66 66 65 72 |-from-mi|nibuffer|
|00002140| 20 22 52 65 64 6f 3a 20 | 22 20 70 72 69 6e 31 2d | "Redo: |" prin1-|
|00002150| 74 6f 2d 73 74 72 69 6e | 67 20 65 71 75 61 6c 20 |to-strin|g equal |
|00002160| 65 76 61 6c 20 64 69 6e | 67 5d 20 36 29 29 0a 0a |eval din|g] 6))..|
|00002170| 28 64 65 66 75 6e 20 6e | 65 78 74 2d 63 6f 6d 70 |(defun n|ext-comp|
|00002180| 6c 65 78 2d 63 6f 6d 6d | 61 6e 64 20 28 6e 29 20 |lex-comm|and (n) |
|00002190| 22 5c 0a 49 6e 73 65 72 | 74 73 20 74 68 65 20 6e |"\.Inser|ts the n|
|000021a0| 65 78 74 20 65 6c 65 6d | 65 6e 74 20 6f 66 20 60 |ext elem|ent of `|
|000021b0| 63 6f 6d 6d 61 6e 64 2d | 68 69 73 74 6f 72 79 27 |command-|history'|
|000021c0| 20 69 6e 74 6f 20 74 68 | 65 20 6d 69 6e 69 62 75 | into th|e minibu|
|000021d0| 66 66 65 72 2e 22 20 28 | 69 6e 74 65 72 61 63 74 |ffer." (|interact|
|000021e0| 69 76 65 20 22 70 22 29 | 20 28 62 79 74 65 2d 63 |ive "p")| (byte-c|
|000021f0| 6f 64 65 20 22 c4 88 c5 | 09 0a 5a 5d 0b 47 5e 18 |ode "...|..Z].G^.|
|00002200| 09 08 55 83 21 00 c6 09 | c5 55 83 1c 00 c7 82 1d |..U.!...|.U......|
|00002210| 00 c8 21 82 32 00 c9 20 | 88 08 89 11 88 ca 09 53 |..!.2.. |.......S|
|00002220| 0b 38 21 63 88 65 62 29 | 87 22 20 5b 6e 61 72 67 |.8!c.eb)|." [narg|
|00002230| 20 72 65 70 65 61 74 2d | 63 6f 6d 70 6c 65 78 2d | repeat-|complex-|
|00002240| 63 6f 6d 6d 61 6e 64 2d | 61 72 67 20 6e 20 63 6f |command-|arg n co|
|00002250| 6d 6d 61 6e 64 2d 68 69 | 73 74 6f 72 79 20 6e 69 |mmand-hi|story ni|
|00002260| 6c 20 31 20 65 72 72 6f | 72 20 22 4e 6f 20 66 6f |l 1 erro|r "No fo|
|00002270| 6c 6c 6f 77 69 6e 67 20 | 69 74 65 6d 20 69 6e 20 |llowing |item in |
|00002280| 63 6f 6d 6d 61 6e 64 20 | 68 69 73 74 6f 72 79 22 |command |history"|
|00002290| 20 22 4e 6f 20 70 72 65 | 63 65 65 64 69 6e 67 20 | "No pre|ceeding |
|000022a0| 69 74 65 6d 20 63 6f 6d | 6d 61 6e 64 20 68 69 73 |item com|mand his|
|000022b0| 74 6f 72 79 22 20 65 72 | 61 73 65 2d 62 75 66 66 |tory" er|ase-buff|
|000022c0| 65 72 20 70 72 69 6e 31 | 2d 74 6f 2d 73 74 72 69 |er prin1|-to-stri|
|000022d0| 6e 67 5d 20 35 29 29 0a | 0a 28 64 65 66 75 6e 20 |ng] 5)).|.(defun |
|000022e0| 70 72 65 76 69 6f 75 73 | 2d 63 6f 6d 70 6c 65 78 |previous|-complex|
|000022f0| 2d 63 6f 6d 6d 61 6e 64 | 20 28 6e 29 20 22 5c 0a |-command| (n) "\.|
|00002300| 49 6e 73 65 72 74 73 20 | 74 68 65 20 70 72 65 76 |Inserts |the prev|
|00002310| 69 6f 75 73 20 65 6c 65 | 6d 65 6e 74 20 6f 66 20 |ious ele|ment of |
|00002320| 60 63 6f 6d 6d 61 6e 64 | 2d 68 69 73 74 6f 72 79 |`command|-history|
|00002330| 27 20 69 6e 74 6f 20 74 | 68 65 20 6d 69 6e 69 62 |' into t|he minib|
|00002340| 75 66 66 65 72 2e 22 20 | 28 69 6e 74 65 72 61 63 |uffer." |(interac|
|00002350| 74 69 76 65 20 22 70 22 | 29 20 28 62 79 74 65 2d |tive "p"|) (byte-|
|00002360| 63 6f 64 65 20 22 c1 88 | c2 08 5b 21 87 22 20 5b |code "..|..[!." [|
|00002370| 6e 20 6e 69 6c 20 6e 65 | 78 74 2d 63 6f 6d 70 6c |n nil ne|xt-compl|
|00002380| 65 78 2d 63 6f 6d 6d 61 | 6e 64 5d 20 32 29 29 0a |ex-comma|nd] 2)).|
|00002390| 0a 28 64 65 66 75 6e 20 | 67 6f 74 6f 2d 6c 69 6e |.(defun |goto-lin|
|000023a0| 65 20 28 61 72 67 29 20 | 22 5c 0a 47 6f 74 6f 20 |e (arg) |"\.Goto |
|000023b0| 6c 69 6e 65 20 41 52 47 | 2c 20 63 6f 75 6e 74 69 |line ARG|, counti|
|000023c0| 6e 67 20 66 72 6f 6d 20 | 6c 69 6e 65 20 31 20 61 |ng from |line 1 a|
|000023d0| 74 20 62 65 67 69 6e 6e | 69 6e 67 20 6f 66 20 62 |t beginn|ing of b|
|000023e0| 75 66 66 65 72 2e 22 20 | 28 69 6e 74 65 72 61 63 |uffer." |(interac|
|000023f0| 74 69 76 65 20 22 4e 47 | 6f 74 6f 20 6c 69 6e 65 |tive "NG|oto line|
|00002400| 3a 20 22 29 20 28 62 79 | 74 65 2d 63 6f 64 65 20 |: ") (by|te-code |
|00002410| 22 c2 88 8c c4 20 88 c5 | 62 88 08 c1 3d 83 19 00 |".... ..|b...=...|
|00002420| c6 c7 c2 c8 0b 53 24 82 | 1d 00 c9 0b 53 21 29 87 |.....S$.|....S!).|
|00002430| 22 20 5b 73 65 6c 65 63 | 74 69 76 65 2d 64 69 73 |" [selec|tive-dis|
|00002440| 70 6c 61 79 20 74 20 6e | 69 6c 20 61 72 67 20 77 |play t n|il arg w|
|00002450| 69 64 65 6e 20 31 20 72 | 65 2d 73 65 61 72 63 68 |iden 1 r|e-search|
|00002460| 2d 66 6f 72 77 61 72 64 | 20 22 5b 0a 0d 5d 22 20 |-forward| "[..]" |
|00002470| 65 6e 64 20 66 6f 72 77 | 61 72 64 2d 6c 69 6e 65 |end forw|ard-line|
|00002480| 5d 20 36 29 29 0a 0a 28 | 66 73 65 74 20 28 71 75 |] 6))..(|fset (qu|
|00002490| 6f 74 65 20 61 64 76 65 | 72 74 69 73 65 64 2d 75 |ote adve|rtised-u|
|000024a0| 6e 64 6f 29 20 28 71 75 | 6f 74 65 20 75 6e 64 6f |ndo) (qu|ote undo|
|000024b0| 29 29 0a 0a 28 64 65 66 | 75 6e 20 75 6e 64 6f 20 |))..(def|un undo |
|000024c0| 28 26 6f 70 74 69 6f 6e | 61 6c 20 61 72 67 29 20 |(&option|al arg) |
|000024d0| 22 5c 0a 55 6e 64 6f 20 | 73 6f 6d 65 20 70 72 65 |"\.Undo |some pre|
|000024e0| 76 69 6f 75 73 20 63 68 | 61 6e 67 65 73 2e 0a 52 |vious ch|anges..R|
|000024f0| 65 70 65 61 74 20 74 68 | 69 73 20 63 6f 6d 6d 61 |epeat th|is comma|
|00002500| 6e 64 20 74 6f 20 75 6e | 64 6f 20 6d 6f 72 65 20 |nd to un|do more |
|00002510| 63 68 61 6e 67 65 73 2e | 0a 41 20 6e 75 6d 65 72 |changes.|.A numer|
|00002520| 69 63 20 61 72 67 75 6d | 65 6e 74 20 73 65 72 76 |ic argum|ent serv|
|00002530| 65 73 20 61 73 20 61 20 | 72 65 70 65 61 74 20 63 |es as a |repeat c|
|00002540| 6f 75 6e 74 2e 22 20 28 | 69 6e 74 65 72 61 63 74 |ount." (|interact|
|00002550| 69 76 65 20 22 2a 70 22 | 29 20 28 62 79 74 65 2d |ive "*p"|) (byte-|
|00002560| 63 6f 64 65 20 22 c4 88 | c5 20 18 c6 c7 21 88 09 |code "..|. ...!..|
|00002570| c8 3d 86 15 00 c9 20 88 | ca cb 21 88 c8 89 12 88 |.=.... .|..!.....|
|00002580| ca 0b 86 20 00 cb 21 88 | 08 85 2e 00 c5 20 3f 85 |... ..!.|..... ?.|
|00002590| 2e 00 cc 20 29 87 22 20 | 5b 6d 6f 64 69 66 69 65 |... )." |[modifie|
|000025a0| 64 20 6c 61 73 74 2d 63 | 6f 6d 6d 61 6e 64 20 74 |d last-c|ommand t|
|000025b0| 68 69 73 2d 63 6f 6d 6d | 61 6e 64 20 61 72 67 20 |his-comm|and arg |
|000025c0| 6e 69 6c 20 62 75 66 66 | 65 72 2d 6d 6f 64 69 66 |nil buff|er-modif|
|000025d0| 69 65 64 2d 70 20 6d 65 | 73 73 61 67 65 20 22 55 |ied-p me|ssage "U|
|000025e0| 6e 64 6f 21 22 20 75 6e | 64 6f 20 75 6e 64 6f 2d |ndo!" un|do undo-|
|000025f0| 73 74 61 72 74 20 75 6e | 64 6f 2d 6d 6f 72 65 20 |start un|do-more |
|00002600| 31 20 64 65 6c 65 74 65 | 2d 61 75 74 6f 2d 73 61 |1 delete|-auto-sa|
|00002610| 76 65 2d 66 69 6c 65 2d | 69 66 2d 6e 65 63 65 73 |ve-file-|if-neces|
|00002620| 73 61 72 79 5d 20 38 29 | 29 0a 0a 28 64 65 66 75 |sary] 8)|)..(defu|
|00002630| 6e 20 73 68 65 6c 6c 2d | 63 6f 6d 6d 61 6e 64 20 |n shell-|command |
|00002640| 28 63 6f 6d 6d 61 6e 64 | 20 26 6f 70 74 69 6f 6e |(command| &option|
|00002650| 61 6c 20 66 6c 61 67 29 | 20 22 5c 0a 45 78 65 63 |al flag)| "\.Exec|
|00002660| 75 74 65 20 73 74 72 69 | 6e 67 20 43 4f 4d 4d 41 |ute stri|ng COMMA|
|00002670| 4e 44 20 69 6e 20 69 6e | 66 65 72 69 6f 72 20 73 |ND in in|ferior s|
|00002680| 68 65 6c 6c 3b 20 64 69 | 73 70 6c 61 79 20 6f 75 |hell; di|splay ou|
|00002690| 74 70 75 74 2c 20 69 66 | 20 61 6e 79 2e 0a 4f 70 |tput, if| any..Op|
|000026a0| 74 69 6f 6e 61 6c 20 73 | 65 63 6f 6e 64 20 61 72 |tional s|econd ar|
|000026b0| 67 20 6e 6f 6e 2d 6e 69 | 6c 20 28 70 72 65 66 69 |g non-ni|l (prefi|
|000026c0| 78 20 61 72 67 2c 20 69 | 66 20 69 6e 74 65 72 61 |x arg, i|f intera|
|000026d0| 63 74 69 76 65 29 0a 6d | 65 61 6e 73 20 69 6e 73 |ctive).m|eans ins|
|000026e0| 65 72 74 20 6f 75 74 70 | 75 74 20 69 6e 20 63 75 |ert outp|ut in cu|
|000026f0| 72 72 65 6e 74 20 62 75 | 66 66 65 72 20 61 66 74 |rrent bu|ffer aft|
|00002700| 65 72 20 70 6f 69 6e 74 | 20 28 6c 65 61 76 65 20 |er point| (leave |
|00002710| 6d 61 72 6b 20 61 66 74 | 65 72 20 69 74 29 2e 22 |mark aft|er it)."|
|00002720| 20 28 69 6e 74 65 72 61 | 63 74 69 76 65 20 22 73 | (intera|ctive "s|
|00002730| 53 68 65 6c 6c 20 63 6f | 6d 6d 61 6e 64 3a 20 0a |Shell co|mmand: .|
|00002740| 50 22 29 20 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |P") (byt|e-code "|
|00002750| c2 88 08 83 1b 00 c5 20 | 88 c6 20 88 c7 09 c2 c3 |....... |.. .....|
|00002760| c2 c8 0c 26 06 88 c9 20 | 82 21 00 ca 60 60 0c c2 |...&... |.!..``..|
|00002770| 24 87 22 20 5b 66 6c 61 | 67 20 73 68 65 6c 6c 2d |$." [fla|g shell-|
|00002780| 66 69 6c 65 2d 6e 61 6d | 65 20 6e 69 6c 20 74 20 |file-nam|e nil t |
|00002790| 63 6f 6d 6d 61 6e 64 20 | 62 61 72 66 2d 69 66 2d |command |barf-if-|
|000027a0| 62 75 66 66 65 72 2d 72 | 65 61 64 2d 6f 6e 6c 79 |buffer-r|ead-only|
|000027b0| 20 70 75 73 68 2d 6d 61 | 72 6b 20 63 61 6c 6c 2d | push-ma|rk call-|
|000027c0| 70 72 6f 63 65 73 73 20 | 22 2d 63 22 20 65 78 63 |process |"-c" exc|
|000027d0| 68 61 6e 67 65 2d 70 6f | 69 6e 74 2d 61 6e 64 2d |hange-po|int-and-|
|000027e0| 6d 61 72 6b 20 73 68 65 | 6c 6c 2d 63 6f 6d 6d 61 |mark she|ll-comma|
|000027f0| 6e 64 2d 6f 6e 2d 72 65 | 67 69 6f 6e 5d 20 39 29 |nd-on-re|gion] 9)|
|00002800| 29 0a 0a 28 64 65 66 75 | 6e 20 73 68 65 6c 6c 2d |)..(defu|n shell-|
|00002810| 63 6f 6d 6d 61 6e 64 2d | 6f 6e 2d 72 65 67 69 6f |command-|on-regio|
|00002820| 6e 20 28 73 74 61 72 74 | 20 65 6e 64 20 63 6f 6d |n (start| end com|
|00002830| 6d 61 6e 64 20 26 6f 70 | 74 69 6f 6e 61 6c 20 66 |mand &op|tional f|
|00002840| 6c 61 67 20 69 6e 74 65 | 72 61 63 74 69 76 65 29 |lag inte|ractive)|
|00002850| 20 22 5c 0a 45 78 65 63 | 75 74 65 20 73 74 72 69 | "\.Exec|ute stri|
|00002860| 6e 67 20 43 4f 4d 4d 41 | 4e 44 20 69 6e 20 69 6e |ng COMMA|ND in in|
|00002870| 66 65 72 69 6f 72 20 73 | 68 65 6c 6c 20 77 69 74 |ferior s|hell wit|
|00002880| 68 20 72 65 67 69 6f 6e | 20 61 73 20 69 6e 70 75 |h region| as inpu|
|00002890| 74 2e 0a 4e 6f 72 6d 61 | 6c 6c 79 20 64 69 73 70 |t..Norma|lly disp|
|000028a0| 6c 61 79 20 6f 75 74 70 | 75 74 20 28 69 66 20 61 |lay outp|ut (if a|
|000028b0| 6e 79 29 20 69 6e 20 74 | 65 6d 70 20 62 75 66 66 |ny) in t|emp buff|
|000028c0| 65 72 3b 0a 50 72 65 66 | 69 78 20 61 72 67 20 6d |er;.Pref|ix arg m|
|000028d0| 65 61 6e 73 20 72 65 70 | 6c 61 63 65 20 74 68 65 |eans rep|lace the|
|000028e0| 20 72 65 67 69 6f 6e 20 | 77 69 74 68 20 69 74 2e | region |with it.|
|000028f0| 0a 4e 6f 6e 69 6e 74 65 | 72 61 63 74 69 76 65 20 |.Noninte|ractive |
|00002900| 61 72 67 73 20 61 72 65 | 20 53 54 41 52 54 2c 20 |args are| START, |
|00002910| 45 4e 44 2c 20 43 4f 4d | 4d 41 4e 44 2c 20 46 4c |END, COM|MAND, FL|
|00002920| 41 47 2e 0a 4e 6f 6e 69 | 6e 74 65 72 61 63 74 69 |AG..Noni|nteracti|
|00002930| 76 65 6c 79 20 46 4c 41 | 47 20 6d 65 61 6e 73 20 |vely FLA|G means |
|00002940| 69 6e 73 65 72 74 20 6f | 75 74 70 75 74 20 69 6e |insert o|utput in|
|00002950| 20 70 6c 61 63 65 20 6f | 66 20 74 65 78 74 20 66 | place o|f text f|
|00002960| 72 6f 6d 20 53 54 41 52 | 54 20 74 6f 20 45 4e 44 |rom STAR|T to END|
|00002970| 2c 0a 61 6e 64 20 70 75 | 74 20 70 6f 69 6e 74 20 |,.and pu|t point |
|00002980| 61 74 20 74 68 65 20 65 | 6e 64 2c 20 62 75 74 20 |at the e|nd, but |
|00002990| 64 6f 6e 27 74 20 61 6c | 74 65 72 20 74 68 65 20 |don't al|ter the |
|000029a0| 6d 61 72 6b 2e 22 20 28 | 69 6e 74 65 72 61 63 74 |mark." (|interact|
|000029b0| 69 76 65 20 22 72 0a 73 | 53 68 65 6c 6c 20 63 6f |ive "r.s|Shell co|
|000029c0| 6d 6d 61 6e 64 20 6f 6e | 20 72 65 67 69 6f 6e 3a |mmand on| region:|
|000029d0| 20 0a 50 0a 70 22 29 20 | 28 62 79 74 65 2d 63 6f | .P.p") |(byte-co|
|000029e0| 64 65 20 22 c7 88 08 83 | 31 00 0a 85 0e 00 60 ca |de "....|1.....`.|
|000029f0| 20 57 19 0a 85 15 00 cb | 20 88 cc 0b 0c 0d c6 c6 | W......| .......|
|00002a00| c7 cd 0e 08 26 08 88 0a | 85 2d 00 09 85 2d 00 ce |....&...|.-...-..|
|00002a10| 20 29 82 88 00 cf d0 21 | 1e 09 0e 09 70 3d 83 56 | ).....!|....p=.V|
|00002a20| 00 d1 0c 64 5c 22 88 d1 | 65 0b 5c 22 88 cc 65 64 |...d\"..|e.\"..ed|
|00002a30| 0d c6 c6 c7 cd 0e 08 26 | 08 82 6c 00 8a 0e 09 71 |.......&|..l....q|
|00002a40| 88 d2 20 29 88 cc 0b 0c | 0d c7 0e 09 c7 cd 0e 08 |.. )....|........|
|00002a50| 26 08 88 8a 0e 09 71 88 | d3 20 d4 56 29 83 84 00 |&.....q.|. .V)...|
|00002a60| d5 d6 0e 09 21 d7 5c 22 | 82 87 00 d8 d9 21 29 87 |....!.\"|.....!).|
|00002a70| 22 20 5b 66 6c 61 67 20 | 73 77 61 70 20 69 6e 74 |" [flag |swap int|
|00002a80| 65 72 61 63 74 69 76 65 | 20 73 74 61 72 74 20 65 |eractive| start e|
|00002a90| 6e 64 20 73 68 65 6c 6c | 2d 66 69 6c 65 2d 6e 61 |nd shell|-file-na|
|00002aa0| 6d 65 20 74 20 6e 69 6c | 20 63 6f 6d 6d 61 6e 64 |me t nil| command|
|00002ab0| 20 62 75 66 66 65 72 20 | 6d 61 72 6b 20 70 75 73 | buffer |mark pus|
|00002ac0| 68 2d 6d 61 72 6b 20 63 | 61 6c 6c 2d 70 72 6f 63 |h-mark c|all-proc|
|00002ad0| 65 73 73 2d 72 65 67 69 | 6f 6e 20 22 2d 63 22 20 |ess-regi|on "-c" |
|00002ae0| 65 78 63 68 61 6e 67 65 | 2d 70 6f 69 6e 74 2d 61 |exchange|-point-a|
|00002af0| 6e 64 2d 6d 61 72 6b 20 | 67 65 74 2d 62 75 66 66 |nd-mark |get-buff|
|00002b00| 65 72 2d 63 72 65 61 74 | 65 20 22 2a 53 68 65 6c |er-creat|e "*Shel|
|00002b10| 6c 20 43 6f 6d 6d 61 6e | 64 20 4f 75 74 70 75 74 |l Comman|d Output|
|00002b20| 2a 22 20 64 65 6c 65 74 | 65 2d 72 65 67 69 6f 6e |*" delet|e-region|
|00002b30| 20 65 72 61 73 65 2d 62 | 75 66 66 65 72 20 62 75 | erase-b|uffer bu|
|00002b40| 66 66 65 72 2d 73 69 7a | 65 20 30 20 73 65 74 2d |ffer-siz|e 0 set-|
|00002b50| 77 69 6e 64 6f 77 2d 73 | 74 61 72 74 20 64 69 73 |window-s|tart dis|
|00002b60| 70 6c 61 79 2d 62 75 66 | 66 65 72 20 31 20 6d 65 |play-buf|fer 1 me|
|00002b70| 73 73 61 67 65 20 22 28 | 53 68 65 6c 6c 20 63 6f |ssage "(|Shell co|
|00002b80| 6d 6d 61 6e 64 20 63 6f | 6d 70 6c 65 74 65 64 20 |mmand co|mpleted |
|00002b90| 77 69 74 68 20 6e 6f 20 | 6f 75 74 70 75 74 29 22 |with no |output)"|
|00002ba0| 5d 20 31 38 29 29 0a 0a | 28 64 65 66 75 6e 20 75 |] 18))..|(defun u|
|00002bb0| 6e 69 76 65 72 73 61 6c | 2d 61 72 67 75 6d 65 6e |niversal|-argumen|
|00002bc0| 74 20 6e 69 6c 20 22 5c | 0a 42 65 67 69 6e 20 61 |t nil "\|.Begin a|
|00002bd0| 20 6e 75 6d 65 72 69 63 | 20 61 72 67 75 6d 65 6e | numeric| argumen|
|00002be0| 74 20 66 6f 72 20 74 68 | 65 20 66 6f 6c 6c 6f 77 |t for th|e follow|
|00002bf0| 69 6e 67 20 63 6f 6d 6d | 61 6e 64 2e 0a 44 69 67 |ing comm|and..Dig|
|00002c00| 69 74 73 20 6f 72 20 6d | 69 6e 75 73 20 73 69 67 |its or m|inus sig|
|00002c10| 6e 20 66 6f 6c 6c 6f 77 | 69 6e 67 20 5c 5c 5b 75 |n follow|ing \\[u|
|00002c20| 6e 69 76 65 72 73 61 6c | 2d 61 72 67 75 6d 65 6e |niversal|-argumen|
|00002c30| 74 5d 20 6d 61 6b 65 20 | 75 70 20 74 68 65 20 6e |t] make |up the n|
|00002c40| 75 6d 65 72 69 63 20 61 | 72 67 75 6d 65 6e 74 2e |umeric a|rgument.|
|00002c50| 0a 5c 5c 5b 75 6e 69 76 | 65 72 73 61 6c 2d 61 72 |.\\[univ|ersal-ar|
|00002c60| 67 75 6d 65 6e 74 5d 20 | 66 6f 6c 6c 6f 77 69 6e |gument] |followin|
|00002c70| 67 20 74 68 65 20 64 69 | 67 69 74 73 20 6f 72 20 |g the di|gits or |
|00002c80| 6d 69 6e 75 73 20 73 69 | 67 6e 20 65 6e 64 73 20 |minus si|gn ends |
|00002c90| 74 68 65 20 61 72 67 75 | 6d 65 6e 74 2e 0a 5c 5c |the argu|ment..\\|
|00002ca0| 5b 75 6e 69 76 65 72 73 | 61 6c 2d 61 72 67 75 6d |[univers|al-argum|
|00002cb0| 65 6e 74 5d 20 77 69 74 | 68 6f 75 74 20 64 69 67 |ent] wit|hout dig|
|00002cc0| 69 74 73 20 6f 72 20 6d | 69 6e 75 73 20 73 69 67 |its or m|inus sig|
|00002cd0| 6e 20 70 72 6f 76 69 64 | 65 73 20 34 20 61 73 20 |n provid|es 4 as |
|00002ce0| 61 72 67 75 6d 65 6e 74 | 2e 0a 52 65 70 65 61 74 |argument|..Repeat|
|00002cf0| 69 6e 67 20 5c 5c 5b 75 | 6e 69 76 65 72 73 61 6c |ing \\[u|niversal|
|00002d00| 2d 61 72 67 75 6d 65 6e | 74 5d 20 77 69 74 68 6f |-argumen|t] witho|
|00002d10| 75 74 20 64 69 67 69 74 | 73 20 6f 72 20 6d 69 6e |ut digit|s or min|
|00002d20| 75 73 20 73 69 67 6e 0a | 20 6d 75 6c 74 69 70 6c |us sign.| multipl|
|00002d30| 69 65 73 20 74 68 65 20 | 61 72 67 75 6d 65 6e 74 |ies the |argument|
|00002d40| 20 62 79 20 34 20 65 61 | 63 68 20 74 69 6d 65 2e | by 4 ea|ch time.|
|00002d50| 22 20 28 69 6e 74 65 72 | 61 63 74 69 76 65 20 6e |" (inter|active n|
|00002d60| 69 6c 29 20 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |il) (byt|e-code "|
|00002d70| c0 88 c5 0b c0 1c 1a 19 | 72 89 14 88 0c 0a 55 85 |........|r.....U.|
|00002d80| 20 00 c6 c5 09 5c 22 89 | 11 88 72 89 14 88 82 0c | ....\".|..r.....|
|00002d90| 00 88 c7 0c 09 c0 23 2b | 87 22 20 5b 6e 69 6c 20 |......#+|." [nil |
|00002da0| 63 2d 75 20 61 72 67 73 | 74 61 72 74 63 68 61 72 |c-u args|tartchar|
|00002db0| 20 6c 61 73 74 2d 63 6f | 6d 6d 61 6e 64 2d 63 68 | last-co|mmand-ch|
|00002dc0| 61 72 20 63 68 61 72 20 | 34 20 2a 20 70 72 65 66 |ar char |4 * pref|
|00002dd0| 69 78 2d 61 72 67 2d 69 | 6e 74 65 72 6e 61 6c 5d |ix-arg-i|nternal]|
|00002de0| 20 35 29 29 0a 0a 28 64 | 65 66 75 6e 20 70 72 65 | 5))..(d|efun pre|
|00002df0| 66 69 78 2d 61 72 67 2d | 69 6e 74 65 72 6e 61 6c |fix-arg-|internal|
|00002e00| 20 28 63 68 61 72 20 63 | 2d 75 20 76 61 6c 75 65 | (char c|-u value|
|00002e10| 29 20 28 62 79 74 65 2d | 63 6f 64 65 20 22 c8 18 |) (byte-|code "..|
|00002e20| c9 09 21 85 0b 00 09 ca | 57 85 14 00 cb 10 09 5b |..!.....|W......[|
|00002e30| 89 11 88 09 cc 3d 85 20 | 00 cb 10 c2 89 11 88 cd |.....=. |........|
|00002e40| 0b 55 85 35 00 08 5b 10 | c2 89 14 88 72 89 13 88 |.U.5..[.|....r...|
|00002e50| 82 21 00 88 0b ce 59 85 | 3f 00 0b cf 58 85 60 00 |.!....Y.|?...X.`.|
|00002e60| d0 c9 09 21 83 4d 00 09 | 82 4e 00 ca d1 5c 22 0b |...!.M..|.N...\".|
|00002e70| ce 5a 5c 5c 11 c2 89 14 | 88 72 89 13 88 82 36 00 |.Z\\....|.r....6.|
|00002e80| 88 d2 0d d3 c8 0b 5c 22 | 5c 22 d4 3d 85 70 00 72 |......\"|\".=.p.r|
|00002e90| 89 13 88 0c 83 7a 00 0c | 43 82 8e 00 c9 09 21 83 |.....z..|C.....!.|
|00002ea0| 87 00 d0 09 08 5c 22 82 | 8e 00 08 cb 55 85 8e 00 |.....\".|....U...|
|00002eb0| cc 89 16 06 88 0b 89 16 | 07 29 87 22 20 5b 73 69 |........|.)." [si|
|00002ec0| 67 6e 20 76 61 6c 75 65 | 20 6e 69 6c 20 63 68 61 |gn value| nil cha|
|00002ed0| 72 20 63 2d 75 20 67 6c | 6f 62 61 6c 2d 6d 61 70 |r c-u gl|obal-map|
|00002ee0| 20 70 72 65 66 69 78 2d | 61 72 67 20 75 6e 72 65 | prefix-|arg unre|
|00002ef0| 61 64 2d 63 6f 6d 6d 61 | 6e 64 2d 63 68 61 72 20 |ad-comma|nd-char |
|00002f00| 31 20 6e 75 6d 62 65 72 | 70 20 30 20 2d 31 20 2d |1 number|p 0 -1 -|
|00002f10| 20 34 35 20 34 38 20 35 | 37 20 2a 20 31 30 20 6c | 45 48 5|7 * 10 l|
|00002f20| 6f 6f 6b 75 70 2d 6b 65 | 79 20 6d 61 6b 65 2d 73 |ookup-ke|y make-s|
|00002f30| 74 72 69 6e 67 20 75 6e | 69 76 65 72 73 61 6c 2d |tring un|iversal-|
|00002f40| 61 72 67 75 6d 65 6e 74 | 5d 20 39 29 29 0a 0a 28 |argument|] 9))..(|
|00002f50| 64 65 66 75 6e 20 64 69 | 67 69 74 2d 61 72 67 75 |defun di|git-argu|
|00002f60| 6d 65 6e 74 20 28 61 72 | 67 29 20 22 5c 0a 50 61 |ment (ar|g) "\.Pa|
|00002f70| 72 74 20 6f 66 20 74 68 | 65 20 6e 75 6d 65 72 69 |rt of th|e numeri|
|00002f80| 63 20 61 72 67 75 6d 65 | 6e 74 20 66 6f 72 20 74 |c argume|nt for t|
|00002f90| 68 65 20 6e 65 78 74 20 | 63 6f 6d 6d 61 6e 64 2e |he next |command.|
|00002fa0| 0a 5c 5c 5b 75 6e 69 76 | 65 72 73 61 6c 2d 61 72 |.\\[univ|ersal-ar|
|00002fb0| 67 75 6d 65 6e 74 5d 20 | 66 6f 6c 6c 6f 77 69 6e |gument] |followin|
|00002fc0| 67 20 64 69 67 69 74 73 | 20 6f 72 20 6d 69 6e 75 |g digits| or minu|
|00002fd0| 73 20 73 69 67 6e 20 65 | 6e 64 73 20 74 68 65 20 |s sign e|nds the |
|00002fe0| 61 72 67 75 6d 65 6e 74 | 2e 22 20 28 69 6e 74 65 |argument|." (inte|
|00002ff0| 72 61 63 74 69 76 65 20 | 22 50 22 29 20 28 62 79 |ractive |"P") (by|
|00003000| 74 65 2d 63 6f 64 65 20 | 22 c1 88 c3 08 c1 0a 23 |te-code |"......#|
|00003010| 87 22 20 5b 6c 61 73 74 | 2d 63 6f 6d 6d 61 6e 64 |." [last|-command|
|00003020| 2d 63 68 61 72 20 6e 69 | 6c 20 61 72 67 20 70 72 |-char ni|l arg pr|
|00003030| 65 66 69 78 2d 61 72 67 | 2d 69 6e 74 65 72 6e 61 |efix-arg|-interna|
|00003040| 6c 5d 20 34 29 29 0a 0a | 28 64 65 66 75 6e 20 6e |l] 4))..|(defun n|
|00003050| 65 67 61 74 69 76 65 2d | 61 72 67 75 6d 65 6e 74 |egative-|argument|
|00003060| 20 28 61 72 67 29 20 22 | 5c 0a 42 65 67 69 6e 20 | (arg) "|\.Begin |
|00003070| 61 20 6e 65 67 61 74 69 | 76 65 20 6e 75 6d 65 72 |a negati|ve numer|
|00003080| 69 63 20 61 72 67 75 6d | 65 6e 74 20 66 6f 72 20 |ic argum|ent for |
|00003090| 74 68 65 20 6e 65 78 74 | 20 63 6f 6d 6d 61 6e 64 |the next| command|
|000030a0| 2e 0a 5c 5c 5b 75 6e 69 | 76 65 72 73 61 6c 2d 61 |..\\[uni|versal-a|
|000030b0| 72 67 75 6d 65 6e 74 5d | 20 66 6f 6c 6c 6f 77 69 |rgument]| followi|
|000030c0| 6e 67 20 64 69 67 69 74 | 73 20 6f 72 20 6d 69 6e |ng digit|s or min|
|000030d0| 75 73 20 73 69 67 6e 20 | 65 6e 64 73 20 74 68 65 |us sign |ends the|
|000030e0| 20 61 72 67 75 6d 65 6e | 74 2e 22 20 28 69 6e 74 | argumen|t." (int|
|000030f0| 65 72 61 63 74 69 76 65 | 20 22 50 22 29 20 28 62 |eractive| "P") (b|
|00003100| 79 74 65 2d 63 6f 64 65 | 20 22 c0 88 c2 c3 c0 09 |yte-code| "......|
|00003110| 23 87 22 20 5b 6e 69 6c | 20 61 72 67 20 70 72 65 |#." [nil| arg pre|
|00003120| 66 69 78 2d 61 72 67 2d | 69 6e 74 65 72 6e 61 6c |fix-arg-|internal|
|00003130| 20 34 35 5d 20 34 29 29 | 0a 0a 28 64 65 66 75 6e | 45] 4))|..(defun|
|00003140| 20 66 6f 72 77 61 72 64 | 2d 74 6f 2d 69 6e 64 65 | forward|-to-inde|
|00003150| 6e 74 61 74 69 6f 6e 20 | 28 61 72 67 29 20 22 5c |ntation |(arg) "\|
|00003160| 0a 4d 6f 76 65 20 66 6f | 72 77 61 72 64 20 41 52 |.Move fo|rward AR|
|00003170| 47 20 6c 69 6e 65 73 20 | 61 6e 64 20 70 6f 73 69 |G lines |and posi|
|00003180| 74 69 6f 6e 20 61 74 20 | 66 69 72 73 74 20 6e 6f |tion at |first no|
|00003190| 6e 62 6c 61 6e 6b 20 63 | 68 61 72 61 63 74 65 72 |nblank c|haracter|
|000031a0| 2e 22 20 28 69 6e 74 65 | 72 61 63 74 69 76 65 20 |." (inte|ractive |
|000031b0| 22 70 22 29 20 28 62 79 | 74 65 2d 63 6f 64 65 20 |"p") (by|te-code |
|000031c0| 22 c1 88 c2 08 21 88 c3 | c4 21 87 22 20 5b 61 72 |"....!..|.!." [ar|
|000031d0| 67 20 6e 69 6c 20 66 6f | 72 77 61 72 64 2d 6c 69 |g nil fo|rward-li|
|000031e0| 6e 65 20 73 6b 69 70 2d | 63 68 61 72 73 2d 66 6f |ne skip-|chars-fo|
|000031f0| 72 77 61 72 64 20 22 20 | 09 22 5d 20 33 29 29 0a |rward " |."] 3)).|
|00003200| 0a 28 64 65 66 75 6e 20 | 62 61 63 6b 77 61 72 64 |.(defun |backward|
|00003210| 2d 74 6f 2d 69 6e 64 65 | 6e 74 61 74 69 6f 6e 20 |-to-inde|ntation |
|00003220| 28 61 72 67 29 20 22 5c | 0a 4d 6f 76 65 20 62 61 |(arg) "\|.Move ba|
|00003230| 63 6b 77 61 72 64 20 41 | 52 47 20 6c 69 6e 65 73 |ckward A|RG lines|
|00003240| 20 61 6e 64 20 70 6f 73 | 69 74 69 6f 6e 20 61 74 | and pos|ition at|
|00003250| 20 66 69 72 73 74 20 6e | 6f 6e 62 6c 61 6e 6b 20 | first n|onblank |
|00003260| 63 68 61 72 61 63 74 65 | 72 2e 22 20 28 69 6e 74 |characte|r." (int|
|00003270| 65 72 61 63 74 69 76 65 | 20 22 70 22 29 20 28 62 |eractive| "p") (b|
|00003280| 79 74 65 2d 63 6f 64 65 | 20 22 c1 88 c2 08 5b 21 |yte-code| "....[!|
|00003290| 88 c3 c4 21 87 22 20 5b | 61 72 67 20 6e 69 6c 20 |...!." [|arg nil |
|000032a0| 66 6f 72 77 61 72 64 2d | 6c 69 6e 65 20 73 6b 69 |forward-|line ski|
|000032b0| 70 2d 63 68 61 72 73 2d | 66 6f 72 77 61 72 64 20 |p-chars-|forward |
|000032c0| 22 20 09 22 5d 20 33 29 | 29 0a 0a 28 64 65 66 75 |" ."] 3)|)..(defu|
|000032d0| 6e 20 6b 69 6c 6c 2d 6c | 69 6e 65 20 28 26 6f 70 |n kill-l|ine (&op|
|000032e0| 74 69 6f 6e 61 6c 20 61 | 72 67 29 20 22 5c 0a 4b |tional a|rg) "\.K|
|000032f0| 69 6c 6c 20 74 68 65 20 | 72 65 73 74 20 6f 66 20 |ill the |rest of |
|00003300| 74 68 65 20 63 75 72 72 | 65 6e 74 20 6c 69 6e 65 |the curr|ent line|
|00003310| 3b 20 69 66 20 6e 6f 20 | 6e 6f 6e 62 6c 61 6e 6b |; if no |nonblank|
|00003320| 73 20 74 68 65 72 65 2c | 20 6b 69 6c 6c 20 74 68 |s there,| kill th|
|00003330| 72 75 20 6e 65 77 6c 69 | 6e 65 2e 0a 57 69 74 68 |ru newli|ne..With|
|00003340| 20 70 72 65 66 69 78 20 | 61 72 67 75 6d 65 6e 74 | prefix |argument|
|00003350| 2c 20 6b 69 6c 6c 20 74 | 68 61 74 20 6d 61 6e 79 |, kill t|hat many|
|00003360| 20 6c 69 6e 65 73 20 66 | 72 6f 6d 20 70 6f 69 6e | lines f|rom poin|
|00003370| 74 2e 0a 4e 65 67 61 74 | 69 76 65 20 61 72 67 75 |t..Negat|ive argu|
|00003380| 6d 65 6e 74 73 20 6b 69 | 6c 6c 20 6c 69 6e 65 73 |ments ki|ll lines|
|00003390| 20 62 61 63 6b 77 61 72 | 64 2e 0a 0a 57 68 65 6e | backwar|d...When|
|000033a0| 20 63 61 6c 6c 69 6e 67 | 20 66 72 6f 6d 20 61 20 | calling| from a |
|000033b0| 70 72 6f 67 72 61 6d 2c | 20 6e 69 6c 20 6d 65 61 |program,| nil mea|
|000033c0| 6e 73 20 5c 22 6e 6f 20 | 61 72 67 5c 22 2c 0a 61 |ns \"no |arg\",.a|
|000033d0| 20 6e 75 6d 62 65 72 20 | 63 6f 75 6e 74 73 20 61 | number |counts a|
|000033e0| 73 20 61 20 70 72 65 66 | 69 78 20 61 72 67 2e 22 |s a pref|ix arg."|
|000033f0| 20 28 69 6e 74 65 72 61 | 63 74 69 76 65 20 22 2a | (intera|ctive "*|
|00003400| 50 22 29 20 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |P") (byt|e-code "|
|00003410| c1 88 c2 60 08 83 10 00 | c3 c4 08 21 21 82 27 00 |...`....|...!!.'.|
|00003420| 6d 85 18 00 c5 c6 c1 5c | 22 88 c7 c8 21 83 25 00 |m......\|"...!.%.|
|00003430| c3 c9 21 82 27 00 ca 20 | 88 60 5c 22 87 22 20 5b |..!.'.. |.`\"." [|
|00003440| 61 72 67 20 6e 69 6c 20 | 6b 69 6c 6c 2d 72 65 67 |arg nil |kill-reg|
|00003450| 69 6f 6e 20 66 6f 72 77 | 61 72 64 2d 6c 69 6e 65 |ion forw|ard-line|
|00003460| 20 70 72 65 66 69 78 2d | 6e 75 6d 65 72 69 63 2d | prefix-|numeric-|
|00003470| 76 61 6c 75 65 20 73 69 | 67 6e 61 6c 20 65 6e 64 |value si|gnal end|
|00003480| 2d 6f 66 2d 62 75 66 66 | 65 72 20 6c 6f 6f 6b 69 |-of-buff|er looki|
|00003490| 6e 67 2d 61 74 20 22 5b | 20 09 5d 2a 24 22 20 31 |ng-at "[| .]*$" 1|
|000034a0| 20 65 6e 64 2d 6f 66 2d | 6c 69 6e 65 5d 20 39 29 | end-of-|line] 9)|
|000034b0| 29 0a 0a 28 64 65 66 76 | 61 72 20 6b 69 6c 6c 2d |)..(defv|ar kill-|
|000034c0| 72 69 6e 67 20 6e 69 6c | 20 22 5c 0a 4c 69 73 74 |ring nil| "\.List|
|000034d0| 20 6f 66 20 6b 69 6c 6c | 65 64 20 74 65 78 74 20 | of kill|ed text |
|000034e0| 73 65 71 75 65 6e 63 65 | 73 2e 22 29 0a 0a 28 64 |sequence|s.")..(d|
|000034f0| 65 66 63 6f 6e 73 74 20 | 6b 69 6c 6c 2d 72 69 6e |efconst |kill-rin|
|00003500| 67 2d 6d 61 78 20 33 30 | 20 22 5c 0a 2a 4d 61 78 |g-max 30| "\.*Max|
|00003510| 69 6d 75 6d 20 6c 65 6e | 67 74 68 20 6f 66 20 6b |imum len|gth of k|
|00003520| 69 6c 6c 20 72 69 6e 67 | 20 62 65 66 6f 72 65 20 |ill ring| before |
|00003530| 6f 6c 64 65 73 74 20 65 | 6c 65 6d 65 6e 74 73 20 |oldest e|lements |
|00003540| 61 72 65 20 74 68 72 6f | 77 6e 20 61 77 61 79 2e |are thro|wn away.|
|00003550| 22 29 0a 0a 28 64 65 66 | 76 61 72 20 6b 69 6c 6c |")..(def|var kill|
|00003560| 2d 72 69 6e 67 2d 79 61 | 6e 6b 2d 70 6f 69 6e 74 |-ring-ya|nk-point|
|00003570| 65 72 20 6e 69 6c 20 22 | 5c 0a 54 68 65 20 74 61 |er nil "|\.The ta|
|00003580| 69 6c 20 6f 66 20 74 68 | 65 20 6b 69 6c 6c 20 72 |il of th|e kill r|
|00003590| 69 6e 67 20 77 68 6f 73 | 65 20 63 61 72 20 69 73 |ing whos|e car is|
|000035a0| 20 74 68 65 20 6c 61 73 | 74 20 74 68 69 6e 67 20 | the las|t thing |
|000035b0| 79 61 6e 6b 65 64 2e 22 | 29 0a 0a 28 64 65 66 75 |yanked."|)..(defu|
|000035c0| 6e 20 73 61 66 65 2d 61 | 6d 69 67 61 2d 70 61 73 |n safe-a|miga-pas|
|000035d0| 74 65 20 6e 69 6c 20 28 | 62 79 74 65 2d 63 6f 64 |te nil (|byte-cod|
|000035e0| 65 20 22 c0 c1 c2 8f 87 | 22 20 5b 6e 69 6c 20 28 |e ".....|" [nil (|
|000035f0| 62 79 74 65 2d 63 6f 64 | 65 20 22 c0 20 87 22 20 |byte-cod|e ". ." |
|00003600| 5b 61 6d 69 67 61 2d 70 | 61 73 74 65 5d 20 32 29 |[amiga-p|aste] 2)|
|00003610| 20 28 28 65 72 72 6f 72 | 20 28 62 79 74 65 2d 63 | ((error| (byte-c|
|00003620| 6f 64 65 20 22 c0 87 22 | 20 5b 6e 69 6c 5d 20 31 |ode ".."| [nil] 1|
|00003630| 29 29 29 5d 20 33 29 29 | 0a 0a 28 64 65 66 75 6e |)))] 3))|..(defun|
|00003640| 20 61 6d 69 67 61 2d 63 | 68 65 63 6b 2d 63 6c 69 | amiga-c|heck-cli|
|00003650| 70 20 6e 69 6c 20 28 62 | 79 74 65 2d 63 6f 64 65 |p nil (b|yte-code|
|00003660| 20 22 08 85 17 00 c5 20 | 19 c2 89 10 88 09 85 16 | "..... |........|
|00003670| 00 c6 09 21 88 0c 89 13 | 29 87 22 20 5b 61 6d 69 |...!....|)." [ami|
|00003680| 67 61 2d 6e 65 77 2d 63 | 6c 69 70 20 73 74 72 20 |ga-new-c|lip str |
|00003690| 6e 69 6c 20 6b 69 6c 6c | 2d 72 69 6e 67 2d 79 61 |nil kill|-ring-ya|
|000036a0| 6e 6b 2d 70 6f 69 6e 74 | 65 72 20 6b 69 6c 6c 2d |nk-point|er kill-|
|000036b0| 72 69 6e 67 20 73 61 66 | 65 2d 61 6d 69 67 61 2d |ring saf|e-amiga-|
|000036c0| 70 61 73 74 65 20 6b 69 | 6c 6c 2d 61 64 64 5d 20 |paste ki|ll-add] |
|000036d0| 34 29 29 0a 0a 28 64 65 | 66 75 6e 20 6b 69 6c 6c |4))..(de|fun kill|
|000036e0| 2d 61 70 70 65 6e 64 20 | 28 73 74 72 69 6e 67 20 |-append |(string |
|000036f0| 62 65 66 6f 72 65 2d 70 | 29 20 28 62 79 74 65 2d |before-p|) (byte-|
|00003700| 63 6f 64 65 20 22 c5 20 | 88 c6 08 09 83 10 00 0a |code ". |........|
|00003710| 08 40 50 82 14 00 08 40 | 0a 50 5c 22 88 c7 08 40 |.@P....@|.P\"...@|
|00003720| 21 88 c4 89 13 87 22 20 | 5b 6b 69 6c 6c 2d 72 69 |!....." |[kill-ri|
|00003730| 6e 67 20 62 65 66 6f 72 | 65 2d 70 20 73 74 72 69 |ng befor|e-p stri|
|00003740| 6e 67 20 61 6d 69 67 61 | 2d 6e 65 77 2d 63 6c 69 |ng amiga|-new-cli|
|00003750| 70 20 6e 69 6c 20 61 6d | 69 67 61 2d 63 68 65 63 |p nil am|iga-chec|
|00003760| 6b 2d 63 6c 69 70 20 73 | 65 74 63 61 72 20 61 6d |k-clip s|etcar am|
|00003770| 69 67 61 2d 63 75 74 5d | 20 35 29 29 0a 0a 28 64 |iga-cut]| 5))..(d|
|00003780| 65 66 75 6e 20 6b 69 6c | 6c 2d 61 64 64 20 28 73 |efun kil|l-add (s|
|00003790| 74 72 69 6e 67 29 20 28 | 62 79 74 65 2d 63 6f 64 |tring) (|byte-cod|
|000037a0| 65 20 22 c5 20 88 09 08 | 42 89 10 88 c6 09 21 88 |e ". ...|B.....!.|
|000037b0| c3 89 12 88 08 47 0c 56 | 85 20 00 c7 c8 0c 53 08 |.....G.V|. ....S.|
|000037c0| 5c 22 c3 5c 22 87 22 20 | 5b 6b 69 6c 6c 2d 72 69 |\".\"." |[kill-ri|
|000037d0| 6e 67 20 73 74 72 69 6e | 67 20 61 6d 69 67 61 2d |ng strin|g amiga-|
|000037e0| 6e 65 77 2d 63 6c 69 70 | 20 6e 69 6c 20 6b 69 6c |new-clip| nil kil|
|000037f0| 6c 2d 72 69 6e 67 2d 6d | 61 78 20 61 6d 69 67 61 |l-ring-m|ax amiga|
|00003800| 2d 63 68 65 63 6b 2d 63 | 6c 69 70 20 61 6d 69 67 |-check-c|lip amig|
|00003810| 61 2d 63 75 74 20 73 65 | 74 63 64 72 20 6e 74 68 |a-cut se|tcdr nth|
|00003820| 63 64 72 5d 20 36 29 29 | 0a 0a 28 64 65 66 75 6e |cdr] 6))|..(defun|
|00003830| 20 6b 69 6c 6c 2d 72 65 | 67 69 6f 6e 20 28 62 65 | kill-re|gion (be|
|00003840| 67 20 65 6e 64 29 20 22 | 5c 0a 4b 69 6c 6c 20 62 |g end) "|\.Kill b|
|00003850| 65 74 77 65 65 6e 20 70 | 6f 69 6e 74 20 61 6e 64 |etween p|oint and|
|00003860| 20 6d 61 72 6b 2e 0a 54 | 68 65 20 74 65 78 74 20 | mark..T|he text |
|00003870| 69 73 20 64 65 6c 65 74 | 65 64 20 62 75 74 20 73 |is delet|ed but s|
|00003880| 61 76 65 64 20 69 6e 20 | 74 68 65 20 6b 69 6c 6c |aved in |the kill|
|00003890| 20 72 69 6e 67 2e 0a 54 | 68 65 20 63 6f 6d 6d 61 | ring..T|he comma|
|000038a0| 6e 64 20 5c 5c 5b 79 61 | 6e 6b 5d 20 63 61 6e 20 |nd \\[ya|nk] can |
|000038b0| 72 65 74 72 69 65 76 65 | 20 69 74 20 66 72 6f 6d |retrieve| it from|
|000038c0| 20 74 68 65 72 65 2e 0a | 28 49 66 20 79 6f 75 20 | there..|(If you |
|000038d0| 77 61 6e 74 20 74 6f 20 | 6b 69 6c 6c 20 61 6e 64 |want to |kill and|
|000038e0| 20 74 68 65 6e 20 79 61 | 6e 6b 20 69 6d 6d 65 64 | then ya|nk immed|
|000038f0| 69 61 74 65 6c 79 2c 20 | 75 73 65 20 5c 5c 5b 63 |iately, |use \\[c|
|00003900| 6f 70 79 2d 72 65 67 69 | 6f 6e 2d 61 73 2d 6b 69 |opy-regi|on-as-ki|
|00003910| 6c 6c 5d 2e 29 0a 0a 54 | 68 69 73 20 69 73 20 74 |ll].)..T|his is t|
|00003920| 68 65 20 70 72 69 6d 69 | 74 69 76 65 20 66 6f 72 |he primi|tive for|
|00003930| 20 70 72 6f 67 72 61 6d | 73 20 74 6f 20 6b 69 6c | program|s to kil|
|00003940| 6c 20 74 65 78 74 20 28 | 61 73 20 6f 70 70 6f 73 |l text (|as oppos|
|00003950| 65 64 20 74 6f 20 64 65 | 6c 65 74 69 6e 67 20 69 |ed to de|leting i|
|00003960| 74 29 2e 0a 53 75 70 70 | 6c 79 20 74 77 6f 20 61 |t)..Supp|ly two a|
|00003970| 72 67 75 6d 65 6e 74 73 | 2c 20 63 68 61 72 61 63 |rguments|, charac|
|00003980| 74 65 72 20 6e 75 6d 62 | 65 72 73 20 69 6e 64 69 |ter numb|ers indi|
|00003990| 63 61 74 69 6e 67 20 74 | 68 65 20 73 74 72 65 74 |cating t|he stret|
|000039a0| 63 68 20 6f 66 20 74 65 | 78 74 0a 20 74 6f 20 62 |ch of te|xt. to b|
|000039b0| 65 20 6b 69 6c 6c 65 64 | 2e 0a 41 6e 79 20 63 6f |e killed|..Any co|
|000039c0| 6d 6d 61 6e 64 20 74 68 | 61 74 20 63 61 6c 6c 73 |mmand th|at calls|
|000039d0| 20 74 68 69 73 20 66 75 | 6e 63 74 69 6f 6e 20 69 | this fu|nction i|
|000039e0| 73 20 61 20 5c 22 6b 69 | 6c 6c 20 63 6f 6d 6d 61 |s a \"ki|ll comma|
|000039f0| 6e 64 5c 22 2e 0a 49 66 | 20 74 68 65 20 70 72 65 |nd\"..If| the pre|
|00003a00| 76 69 6f 75 73 20 63 6f | 6d 6d 61 6e 64 20 77 61 |vious co|mmand wa|
|00003a10| 73 20 61 6c 73 6f 20 61 | 20 6b 69 6c 6c 20 63 6f |s also a| kill co|
|00003a20| 6d 6d 61 6e 64 2c 0a 74 | 68 65 20 74 65 78 74 20 |mmand,.t|he text |
|00003a30| 6b 69 6c 6c 65 64 20 74 | 68 69 73 20 74 69 6d 65 |killed t|his time|
|00003a40| 20 61 70 70 65 6e 64 73 | 20 74 6f 20 74 68 65 20 | appends| to the |
|00003a50| 74 65 78 74 20 6b 69 6c | 6c 65 64 20 6c 61 73 74 |text kil|led last|
|00003a60| 20 74 69 6d 65 0a 74 6f | 20 6d 61 6b 65 20 6f 6e | time.to| make on|
|00003a70| 65 20 65 6e 74 72 79 20 | 69 6e 20 74 68 65 20 6b |e entry |in the k|
|00003a80| 69 6c 6c 20 72 69 6e 67 | 2e 22 20 28 69 6e 74 65 |ill ring|." (inte|
|00003a90| 72 61 63 74 69 76 65 20 | 22 2a 72 22 29 20 28 62 |ractive |"*r") (b|
|00003aa0| 79 74 65 2d 63 6f 64 65 | 20 22 ca 88 08 c1 3d 3f |yte-code| "....=?|
|00003ab0| 85 19 00 0a cb 3d 3f 85 | 19 00 0b 0c 3d 3f 85 19 |.....=?.|....=?..|
|00003ac0| 00 0d 3f 83 40 00 0b 0c | 5d 0b 0c 5e 5a cc 5c 5c |..?.@...|]..^Z.\\|
|00003ad0| 1e 06 cd 0b 0c 5c 22 88 | ce 08 40 40 21 88 cb 89 |.....\".|..@@!...|
|00003ae0| 16 07 88 0e 09 89 16 08 | 29 82 49 00 cf 0b 0c 5c |........|).I....\|
|00003af0| 22 88 cd 0b 0c 5c 22 87 | 22 20 5b 62 75 66 66 65 |"....\".|" [buffe|
|00003b00| 72 2d 75 6e 64 6f 2d 6c | 69 73 74 20 74 20 6c 61 |r-undo-l|ist t la|
|00003b10| 73 74 2d 63 6f 6d 6d 61 | 6e 64 20 62 65 67 20 65 |st-comma|nd beg e|
|00003b20| 6e 64 20 62 75 66 66 65 | 72 2d 72 65 61 64 2d 6f |nd buffe|r-read-o|
|00003b30| 6e 6c 79 20 75 6e 64 6f | 2d 68 69 67 68 2d 74 68 |nly undo|-high-th|
|00003b40| 72 65 73 68 6f 6c 64 20 | 74 68 69 73 2d 63 6f 6d |reshold |this-com|
|00003b50| 6d 61 6e 64 20 6b 69 6c | 6c 2d 72 69 6e 67 2d 79 |mand kil|l-ring-y|
|00003b60| 61 6e 6b 2d 70 6f 69 6e | 74 65 72 20 6b 69 6c 6c |ank-poin|ter kill|
|00003b70| 2d 72 69 6e 67 20 6e 69 | 6c 20 6b 69 6c 6c 2d 72 |-ring ni|l kill-r|
|00003b80| 65 67 69 6f 6e 20 31 30 | 30 20 64 65 6c 65 74 65 |egion 10|0 delete|
|00003b90| 2d 72 65 67 69 6f 6e 20 | 6b 69 6c 6c 2d 61 64 64 |-region |kill-add|
|00003ba0| 20 63 6f 70 79 2d 72 65 | 67 69 6f 6e 2d 61 73 2d | copy-re|gion-as-|
|00003bb0| 6b 69 6c 6c 5d 20 36 29 | 29 0a 0a 28 66 73 65 74 |kill] 6)|)..(fset|
|00003bc0| 20 28 71 75 6f 74 65 20 | 6b 69 6c 6c 2d 72 69 6e | (quote |kill-rin|
|00003bd0| 67 2d 73 61 76 65 29 20 | 28 71 75 6f 74 65 20 63 |g-save) |(quote c|
|00003be0| 6f 70 79 2d 72 65 67 69 | 6f 6e 2d 61 73 2d 6b 69 |opy-regi|on-as-ki|
|00003bf0| 6c 6c 29 29 0a 0a 28 64 | 65 66 75 6e 20 63 6f 70 |ll))..(d|efun cop|
|00003c00| 79 2d 72 65 67 69 6f 6e | 2d 61 73 2d 6b 69 6c 6c |y-region|-as-kill|
|00003c10| 20 28 62 65 67 20 65 6e | 64 29 20 22 5c 0a 53 61 | (beg en|d) "\.Sa|
|00003c20| 76 65 20 74 68 65 20 72 | 65 67 69 6f 6e 20 61 73 |ve the r|egion as|
|00003c30| 20 69 66 20 6b 69 6c 6c | 65 64 2c 20 62 75 74 20 | if kill|ed, but |
|00003c40| 64 6f 6e 27 74 20 6b 69 | 6c 6c 20 69 74 2e 22 20 |don't ki|ll it." |
|00003c50| 28 69 6e 74 65 72 61 63 | 74 69 76 65 20 22 72 22 |(interac|tive "r"|
|00003c60| 29 20 28 62 79 74 65 2d | 63 6f 64 65 20 22 c6 88 |) (byte-|code "..|
|00003c70| 08 c7 3d 83 14 00 c8 c9 | 09 0a 5c 22 0a 09 57 5c |..=.....|..\"..W\|
|00003c80| 22 82 1a 00 ca c9 09 0a | 5c 22 21 88 c7 89 13 88 |".......|\"!.....|
|00003c90| 0d 89 14 87 22 20 5b 6c | 61 73 74 2d 63 6f 6d 6d |...." [l|ast-comm|
|00003ca0| 61 6e 64 20 62 65 67 20 | 65 6e 64 20 74 68 69 73 |and beg |end this|
|00003cb0| 2d 63 6f 6d 6d 61 6e 64 | 20 6b 69 6c 6c 2d 72 69 |-command| kill-ri|
|00003cc0| 6e 67 2d 79 61 6e 6b 2d | 70 6f 69 6e 74 65 72 20 |ng-yank-|pointer |
|00003cd0| 6b 69 6c 6c 2d 72 69 6e | 67 20 6e 69 6c 20 6b 69 |kill-rin|g nil ki|
|00003ce0| 6c 6c 2d 72 65 67 69 6f | 6e 20 6b 69 6c 6c 2d 61 |ll-regio|n kill-a|
|00003cf0| 70 70 65 6e 64 20 62 75 | 66 66 65 72 2d 73 75 62 |ppend bu|ffer-sub|
|00003d00| 73 74 72 69 6e 67 20 6b | 69 6c 6c 2d 61 64 64 5d |string k|ill-add]|
|00003d10| 20 36 29 29 0a 0a 28 64 | 65 66 75 6e 20 61 70 70 | 6))..(d|efun app|
|00003d20| 65 6e 64 2d 6e 65 78 74 | 2d 6b 69 6c 6c 20 6e 69 |end-next|-kill ni|
|00003d30| 6c 20 22 5c 0a 43 61 75 | 73 65 20 66 6f 6c 6c 6f |l "\.Cau|se follo|
|00003d40| 77 69 6e 67 20 63 6f 6d | 6d 61 6e 64 2c 20 69 66 |wing com|mand, if|
|00003d50| 20 6b 69 6c 6c 2c 20 74 | 6f 20 61 70 70 65 6e 64 | kill, t|o append|
|00003d60| 20 74 6f 20 70 72 65 76 | 69 6f 75 73 20 6b 69 6c | to prev|ious kil|
|00003d70| 6c 2e 22 20 28 69 6e 74 | 65 72 61 63 74 69 76 65 |l." (int|eractive|
|00003d80| 29 20 28 62 79 74 65 2d | 63 6f 64 65 20 22 c2 88 |) (byte-|code "..|
|00003d90| 74 83 0c 00 c3 89 10 82 | 0f 00 c3 89 11 87 22 20 |t.......|......" |
|00003da0| 5b 74 68 69 73 2d 63 6f | 6d 6d 61 6e 64 20 6c 61 |[this-co|mmand la|
|00003db0| 73 74 2d 63 6f 6d 6d 61 | 6e 64 20 6e 69 6c 20 6b |st-comma|nd nil k|
|00003dc0| 69 6c 6c 2d 72 65 67 69 | 6f 6e 5d 20 32 29 29 0a |ill-regi|on] 2)).|
|00003dd0| 0a 28 64 65 66 75 6e 20 | 72 6f 74 61 74 65 2d 79 |.(defun |rotate-y|
|00003de0| 61 6e 6b 2d 70 6f 69 6e | 74 65 72 20 28 61 72 67 |ank-poin|ter (arg|
|00003df0| 29 20 22 5c 0a 52 6f 74 | 61 74 65 20 74 68 65 20 |) "\.Rot|ate the |
|00003e00| 79 61 6e 6b 69 6e 67 20 | 70 6f 69 6e 74 20 69 6e |yanking |point in|
|00003e10| 20 74 68 65 20 6b 69 6c | 6c 20 72 69 6e 67 2e 22 | the kil|l ring."|
|00003e20| 20 28 69 6e 74 65 72 61 | 63 74 69 76 65 20 22 70 | (intera|ctive "p|
|00003e30| 22 29 20 28 62 79 74 65 | 2d 63 6f 64 65 20 22 c4 |") (byte|-code ".|
|00003e40| 88 09 47 18 c5 08 21 83 | 11 00 c6 c7 21 82 1f 00 |..G...!.|....!...|
|00003e50| c8 c9 0b 08 0a 47 5a 5c | 5c 08 5c 22 09 5c 22 89 |.....GZ\|\.\".\".|
|00003e60| 12 29 87 22 20 5b 6c 65 | 6e 67 74 68 20 6b 69 6c |.)." [le|ngth kil|
|00003e70| 6c 2d 72 69 6e 67 20 6b | 69 6c 6c 2d 72 69 6e 67 |l-ring k|ill-ring|
|00003e80| 2d 79 61 6e 6b 2d 70 6f | 69 6e 74 65 72 20 61 72 |-yank-po|inter ar|
|00003e90| 67 20 6e 69 6c 20 7a 65 | 72 6f 70 20 65 72 72 6f |g nil ze|rop erro|
|00003ea0| 72 20 22 4b 69 6c 6c 20 | 72 69 6e 67 20 69 73 20 |r "Kill |ring is |
|00003eb0| 65 6d 70 74 79 22 20 6e | 74 68 63 64 72 20 25 5d |empty" n|thcdr %]|
|00003ec0| 20 37 29 29 0a 0a 28 64 | 65 66 75 6e 20 79 61 6e | 7))..(d|efun yan|
|00003ed0| 6b 2d 70 6f 70 20 28 61 | 72 67 29 20 22 5c 0a 52 |k-pop (a|rg) "\.R|
|00003ee0| 65 70 6c 61 63 65 20 6a | 75 73 74 2d 79 61 6e 6b |eplace j|ust-yank|
|00003ef0| 65 64 20 73 74 72 65 74 | 63 68 20 6f 66 20 6b 69 |ed stret|ch of ki|
|00003f00| 6c 6c 65 64 2d 74 65 78 | 74 20 77 69 74 68 20 61 |lled-tex|t with a|
|00003f10| 20 64 69 66 66 65 72 65 | 6e 74 20 73 74 72 65 74 | differe|nt stret|
|00003f20| 63 68 2e 0a 54 68 69 73 | 20 63 6f 6d 6d 61 6e 64 |ch..This| command|
|00003f30| 20 69 73 20 61 6c 6c 6f | 77 65 64 20 6f 6e 6c 79 | is allo|wed only|
|00003f40| 20 69 6d 6d 65 64 69 61 | 74 65 6c 79 20 61 66 74 | immedia|tely aft|
|00003f50| 65 72 20 61 20 20 79 61 | 6e 6b 20 20 6f 72 20 61 |er a ya|nk or a|
|00003f60| 20 20 79 61 6e 6b 2d 70 | 6f 70 2e 0a 41 74 20 73 | yank-p|op..At s|
|00003f70| 75 63 68 20 61 20 74 69 | 6d 65 2c 20 74 68 65 20 |uch a ti|me, the |
|00003f80| 72 65 67 69 6f 6e 20 63 | 6f 6e 74 61 69 6e 73 20 |region c|ontains |
|00003f90| 61 20 73 74 72 65 74 63 | 68 20 6f 66 20 72 65 69 |a stretc|h of rei|
|00003fa0| 6e 73 65 72 74 65 64 0a | 70 72 65 76 69 6f 75 73 |nserted.|previous|
|00003fb0| 6c 79 2d 6b 69 6c 6c 65 | 64 20 74 65 78 74 2e 20 |ly-kille|d text. |
|00003fc0| 20 79 61 6e 6b 2d 70 6f | 70 20 20 64 65 6c 65 74 | yank-po|p delet|
|00003fd0| 65 73 20 74 68 61 74 20 | 74 65 78 74 20 61 6e 64 |es that |text and|
|00003fe0| 20 69 6e 73 65 72 74 73 | 20 69 6e 20 69 74 73 0a | inserts| in its.|
|00003ff0| 70 6c 61 63 65 20 61 20 | 64 69 66 66 65 72 65 6e |place a |differen|
|00004000| 74 20 73 74 72 65 74 63 | 68 20 6f 66 20 6b 69 6c |t stretc|h of kil|
|00004010| 6c 65 64 20 74 65 78 74 | 2e 0a 0a 57 69 74 68 20 |led text|...With |
|00004020| 6e 6f 20 61 72 67 75 6d | 65 6e 74 2c 20 74 68 65 |no argum|ent, the|
|00004030| 20 70 72 65 76 69 6f 75 | 73 20 6b 69 6c 6c 20 69 | previou|s kill i|
|00004040| 73 20 69 6e 73 65 72 74 | 65 64 2e 0a 57 69 74 68 |s insert|ed..With|
|00004050| 20 61 72 67 75 6d 65 6e | 74 20 6e 2c 20 74 68 65 | argumen|t n, the|
|00004060| 20 6e 27 74 68 20 70 72 | 65 76 69 6f 75 73 20 6b | n'th pr|evious k|
|00004070| 69 6c 6c 20 69 73 20 69 | 6e 73 65 72 74 65 64 2e |ill is i|nserted.|
|00004080| 0a 49 66 20 6e 20 69 73 | 20 6e 65 67 61 74 69 76 |.If n is| negativ|
|00004090| 65 2c 20 74 68 69 73 20 | 69 73 20 61 20 6d 6f 72 |e, this |is a mor|
|000040a0| 65 20 72 65 63 65 6e 74 | 20 6b 69 6c 6c 2e 0a 0a |e recent| kill...|
|000040b0| 54 68 65 20 73 65 71 75 | 65 6e 63 65 20 6f 66 20 |The sequ|ence of |
|000040c0| 6b 69 6c 6c 73 20 77 72 | 61 70 73 20 61 72 6f 75 |kills wr|aps arou|
|000040d0| 6e 64 2c 20 73 6f 20 74 | 68 61 74 20 61 66 74 65 |nd, so t|hat afte|
|000040e0| 72 20 74 68 65 20 6f 6c | 64 65 73 74 20 6f 6e 65 |r the ol|dest one|
|000040f0| 0a 63 6f 6d 65 73 20 74 | 68 65 20 6e 65 77 65 73 |.comes t|he newes|
|00004100| 74 20 6f 6e 65 2e 22 20 | 28 69 6e 74 65 72 61 63 |t one." |(interac|
|00004110| 74 69 76 65 20 22 2a 70 | 22 29 20 28 62 79 74 65 |tive "*p|") (byte|
|00004120| 2d 63 6f 64 65 20 22 c5 | 88 08 c6 3d 3f 85 0c 00 |-code ".|...=?...|
|00004130| c7 c8 21 88 c6 89 11 88 | 60 c9 20 57 1a ca 60 c9 |..!.....|`. W..`.|
|00004140| 20 5c 22 88 cb 0b 21 88 | cc 60 21 88 0c 40 63 88 | \"...!.|.`!..@c.|
|00004150| 0a 85 2e 00 cd 20 29 87 | 22 20 5b 6c 61 73 74 2d |..... ).|" [last-|
|00004160| 63 6f 6d 6d 61 6e 64 20 | 74 68 69 73 2d 63 6f 6d |command |this-com|
|00004170| 6d 61 6e 64 20 62 65 66 | 6f 72 65 20 61 72 67 20 |mand bef|ore arg |
|00004180| 6b 69 6c 6c 2d 72 69 6e | 67 2d 79 61 6e 6b 2d 70 |kill-rin|g-yank-p|
|00004190| 6f 69 6e 74 65 72 20 6e | 69 6c 20 79 61 6e 6b 20 |ointer n|il yank |
|000041a0| 65 72 72 6f 72 20 22 50 | 72 65 76 69 6f 75 73 20 |error "P|revious |
|000041b0| 63 6f 6d 6d 61 6e 64 20 | 77 61 73 20 6e 6f 74 20 |command |was not |
|000041c0| 61 20 79 61 6e 6b 22 20 | 6d 61 72 6b 20 64 65 6c |a yank" |mark del|
|000041d0| 65 74 65 2d 72 65 67 69 | 6f 6e 20 72 6f 74 61 74 |ete-regi|on rotat|
|000041e0| 65 2d 79 61 6e 6b 2d 70 | 6f 69 6e 74 65 72 20 73 |e-yank-p|ointer s|
|000041f0| 65 74 2d 6d 61 72 6b 20 | 65 78 63 68 61 6e 67 65 |et-mark |exchange|
|00004200| 2d 70 6f 69 6e 74 2d 61 | 6e 64 2d 6d 61 72 6b 5d |-point-a|nd-mark]|
|00004210| 20 38 29 29 0a 0a 28 64 | 65 66 75 6e 20 79 61 6e | 8))..(d|efun yan|
|00004220| 6b 20 28 26 6f 70 74 69 | 6f 6e 61 6c 20 61 72 67 |k (&opti|onal arg|
|00004230| 29 20 22 5c 0a 52 65 69 | 6e 73 65 72 74 20 74 68 |) "\.Rei|nsert th|
|00004240| 65 20 6c 61 73 74 20 73 | 74 72 65 74 63 68 20 6f |e last s|tretch o|
|00004250| 66 20 6b 69 6c 6c 65 64 | 20 74 65 78 74 2e 0a 4d |f killed| text..M|
|00004260| 6f 72 65 20 70 72 65 63 | 69 73 65 6c 79 2c 20 72 |ore prec|isely, r|
|00004270| 65 69 6e 73 65 72 74 20 | 74 68 65 20 73 74 72 65 |einsert |the stre|
|00004280| 74 63 68 20 6f 66 20 6b | 69 6c 6c 65 64 20 74 65 |tch of k|illed te|
|00004290| 78 74 20 6d 6f 73 74 20 | 72 65 63 65 6e 74 6c 79 |xt most |recently|
|000042a0| 0a 6b 69 6c 6c 65 64 20 | 4f 52 20 79 61 6e 6b 65 |.killed |OR yanke|
|000042b0| 64 2e 0a 57 69 74 68 20 | 6a 75 73 74 20 43 2d 55 |d..With |just C-U|
|000042c0| 20 61 73 20 61 72 67 75 | 6d 65 6e 74 2c 20 73 61 | as argu|ment, sa|
|000042d0| 6d 65 20 62 75 74 20 70 | 75 74 20 70 6f 69 6e 74 |me but p|ut point|
|000042e0| 20 69 6e 20 66 72 6f 6e | 74 20 28 61 6e 64 20 6d | in fron|t (and m|
|000042f0| 61 72 6b 20 61 74 20 65 | 6e 64 29 2e 0a 57 69 74 |ark at e|nd)..Wit|
|00004300| 68 20 61 72 67 75 6d 65 | 6e 74 20 6e 2c 20 72 65 |h argume|nt n, re|
|00004310| 69 6e 73 65 72 74 20 74 | 68 65 20 6e 74 68 20 6d |insert t|he nth m|
|00004320| 6f 73 74 20 72 65 63 65 | 6e 74 6c 79 20 6b 69 6c |ost rece|ntly kil|
|00004330| 6c 65 64 20 73 74 72 65 | 74 63 68 20 6f 66 20 6b |led stre|tch of k|
|00004340| 69 6c 6c 65 64 0a 74 65 | 78 74 2e 0a 53 65 65 20 |illed.te|xt..See |
|00004350| 61 6c 73 6f 20 74 68 65 | 20 63 6f 6d 6d 61 6e 64 |also the| command|
|00004360| 20 5c 5c 5b 79 61 6e 6b | 2d 70 6f 70 5d 2e 22 20 | \\[yank|-pop]." |
|00004370| 28 69 6e 74 65 72 61 63 | 74 69 76 65 20 22 2a 50 |(interac|tive "*P|
|00004380| 22 29 20 28 62 79 74 65 | 2d 63 6f 64 65 20 22 c2 |") (byte|-code ".|
|00004390| 88 c3 20 88 c4 08 3c 83 | 0f 00 c5 82 1b 00 08 c6 |.. ...<.|........|
|000043a0| 3d 83 19 00 c7 82 1b 00 | 08 53 21 88 c8 60 21 88 |=.......|.S!..`!.|
|000043b0| 09 40 63 88 08 3a 85 2c | 00 c9 20 87 22 20 5b 61 |.@c..:.,|.. ." [a|
|000043c0| 72 67 20 6b 69 6c 6c 2d | 72 69 6e 67 2d 79 61 6e |rg kill-|ring-yan|
|000043d0| 6b 2d 70 6f 69 6e 74 65 | 72 20 6e 69 6c 20 61 6d |k-pointe|r nil am|
|000043e0| 69 67 61 2d 63 68 65 63 | 6b 2d 63 6c 69 70 20 72 |iga-chec|k-clip r|
|000043f0| 6f 74 61 74 65 2d 79 61 | 6e 6b 2d 70 6f 69 6e 74 |otate-ya|nk-point|
|00004400| 65 72 20 30 20 2d 20 2d | 31 20 70 75 73 68 2d 6d |er 0 - -|1 push-m|
|00004410| 61 72 6b 20 65 78 63 68 | 61 6e 67 65 2d 70 6f 69 |ark exch|ange-poi|
|00004420| 6e 74 2d 61 6e 64 2d 6d | 61 72 6b 5d 20 35 29 29 |nt-and-m|ark] 5))|
|00004430| 0a 0a 28 64 65 66 75 6e | 20 69 6e 73 65 72 74 2d |..(defun| insert-|
|00004440| 62 75 66 66 65 72 20 28 | 62 75 66 66 65 72 29 20 |buffer (|buffer) |
|00004450| 22 5c 0a 49 6e 73 65 72 | 74 20 61 66 74 65 72 20 |"\.Inser|t after |
|00004460| 70 6f 69 6e 74 20 74 68 | 65 20 63 6f 6e 74 65 6e |point th|e conten|
|00004470| 74 73 20 6f 66 20 42 55 | 46 46 45 52 2e 0a 50 75 |ts of BU|FFER..Pu|
|00004480| 74 73 20 6d 61 72 6b 20 | 61 66 74 65 72 20 74 68 |ts mark |after th|
|00004490| 65 20 69 6e 73 65 72 74 | 65 64 20 74 65 78 74 2e |e insert|ed text.|
|000044a0| 0a 42 55 46 46 45 52 20 | 6d 61 79 20 62 65 20 61 |.BUFFER |may be a|
|000044b0| 20 62 75 66 66 65 72 20 | 6f 72 20 61 20 62 75 66 | buffer |or a buf|
|000044c0| 66 65 72 20 6e 61 6d 65 | 2e 22 20 28 69 6e 74 65 |fer name|." (inte|
|000044d0| 72 61 63 74 69 76 65 20 | 22 2a 62 49 6e 73 65 72 |ractive |"*bInser|
|000044e0| 74 20 62 75 66 66 65 72 | 3a 20 22 29 20 28 62 79 |t buffer|: ") (by|
|000044f0| 74 65 2d 63 6f 64 65 20 | 22 c4 88 c5 08 21 86 0d |te-code |"....!..|
|00004500| 00 c6 08 21 89 10 88 c4 | c4 c4 1b 1a 19 8a 8a 08 |...!....|........|
|00004510| 71 88 65 11 64 89 12 29 | 88 c7 08 09 0a 23 88 60 |q.e.d..)|.....#.`|
|00004520| 89 13 29 88 c8 0b 21 2b | 87 22 20 5b 62 75 66 66 |..)...!+|." [buff|
|00004530| 65 72 20 73 74 61 72 74 | 20 65 6e 64 20 6e 65 77 |er start| end new|
|00004540| 6d 61 72 6b 20 6e 69 6c | 20 62 75 66 66 65 72 70 |mark nil| bufferp|
|00004550| 20 67 65 74 2d 62 75 66 | 66 65 72 20 69 6e 73 65 | get-buf|fer inse|
|00004560| 72 74 2d 62 75 66 66 65 | 72 2d 73 75 62 73 74 72 |rt-buffe|r-substr|
|00004570| 69 6e 67 20 70 75 73 68 | 2d 6d 61 72 6b 5d 20 36 |ing push|-mark] 6|
|00004580| 29 29 0a 0a 28 64 65 66 | 75 6e 20 61 70 70 65 6e |))..(def|un appen|
|00004590| 64 2d 74 6f 2d 62 75 66 | 66 65 72 20 28 62 75 66 |d-to-buf|fer (buf|
|000045a0| 66 65 72 20 73 74 61 72 | 74 20 65 6e 64 29 20 22 |fer star|t end) "|
|000045b0| 5c 0a 41 70 70 65 6e 64 | 20 74 6f 20 73 70 65 63 |\.Append| to spec|
|000045c0| 69 66 69 65 64 20 62 75 | 66 66 65 72 20 74 68 65 |ified bu|ffer the|
|000045d0| 20 74 65 78 74 20 6f 66 | 20 74 68 65 20 72 65 67 | text of| the reg|
|000045e0| 69 6f 6e 2e 0a 49 74 20 | 69 73 20 69 6e 73 65 72 |ion..It |is inser|
|000045f0| 74 65 64 20 69 6e 74 6f | 20 74 68 61 74 20 62 75 |ted into| that bu|
|00004600| 66 66 65 72 20 62 65 66 | 6f 72 65 20 69 74 73 20 |ffer bef|ore its |
|00004610| 70 6f 69 6e 74 2e 0a 0a | 57 68 65 6e 20 63 61 6c |point...|When cal|
|00004620| 6c 69 6e 67 20 66 72 6f | 6d 20 61 20 70 72 6f 67 |ling fro|m a prog|
|00004630| 72 61 6d 2c 20 67 69 76 | 65 20 74 68 72 65 65 20 |ram, giv|e three |
|00004640| 61 72 67 75 6d 65 6e 74 | 73 3a 0a 61 20 62 75 66 |argument|s:.a buf|
|00004650| 66 65 72 20 6f 72 20 74 | 68 65 20 6e 61 6d 65 20 |fer or t|he name |
|00004660| 6f 66 20 6f 6e 65 2c 20 | 61 6e 64 20 74 77 6f 20 |of one, |and two |
|00004670| 63 68 61 72 61 63 74 65 | 72 20 6e 75 6d 62 65 72 |characte|r number|
|00004680| 73 0a 73 70 65 63 69 66 | 79 69 6e 67 20 74 68 65 |s.specif|ying the|
|00004690| 20 70 6f 72 74 69 6f 6e | 20 6f 66 20 74 68 65 20 | portion| of the |
|000046a0| 63 75 72 72 65 6e 74 20 | 62 75 66 66 65 72 20 74 |current |buffer t|
|000046b0| 6f 20 62 65 20 63 6f 70 | 69 65 64 2e 22 20 28 69 |o be cop|ied." (i|
|000046c0| 6e 74 65 72 61 63 74 69 | 76 65 20 22 42 41 70 70 |nteracti|ve "BApp|
|000046d0| 65 6e 64 20 74 6f 20 62 | 75 66 66 65 72 3a 20 0a |end to b|uffer: .|
|000046e0| 72 22 29 20 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |r") (byt|e-code "|
|000046f0| c4 88 70 18 8a c5 09 21 | 71 88 c6 08 0a 0b 23 29 |..p....!|q.....#)|
|00004700| 29 87 22 20 5b 6f 6c 64 | 62 75 66 20 62 75 66 66 |)." [old|buf buff|
|00004710| 65 72 20 73 74 61 72 74 | 20 65 6e 64 20 6e 69 6c |er start| end nil|
|00004720| 20 67 65 74 2d 62 75 66 | 66 65 72 2d 63 72 65 61 | get-buf|fer-crea|
|00004730| 74 65 20 69 6e 73 65 72 | 74 2d 62 75 66 66 65 72 |te inser|t-buffer|
|00004740| 2d 73 75 62 73 74 72 69 | 6e 67 5d 20 35 29 29 0a |-substri|ng] 5)).|
|00004750| 0a 28 64 65 66 75 6e 20 | 70 72 65 70 65 6e 64 2d |.(defun |prepend-|
|00004760| 74 6f 2d 62 75 66 66 65 | 72 20 28 62 75 66 66 65 |to-buffe|r (buffe|
|00004770| 72 20 73 74 61 72 74 20 | 65 6e 64 29 20 22 5c 0a |r start |end) "\.|
|00004780| 50 72 65 70 65 6e 64 20 | 74 6f 20 73 70 65 63 69 |Prepend |to speci|
|00004790| 66 69 65 64 20 62 75 66 | 66 65 72 20 74 68 65 20 |fied buf|fer the |
|000047a0| 74 65 78 74 20 6f 66 20 | 74 68 65 20 72 65 67 69 |text of |the regi|
|000047b0| 6f 6e 2e 0a 49 74 20 69 | 73 20 69 6e 73 65 72 74 |on..It i|s insert|
|000047c0| 65 64 20 69 6e 74 6f 20 | 74 68 61 74 20 62 75 66 |ed into |that buf|
|000047d0| 66 65 72 20 61 66 74 65 | 72 20 69 74 73 20 70 6f |fer afte|r its po|
|000047e0| 69 6e 74 2e 0a 0a 57 68 | 65 6e 20 63 61 6c 6c 69 |int...Wh|en calli|
|000047f0| 6e 67 20 66 72 6f 6d 20 | 61 20 70 72 6f 67 72 61 |ng from |a progra|
|00004800| 6d 2c 20 67 69 76 65 20 | 74 68 72 65 65 20 61 72 |m, give |three ar|
|00004810| 67 75 6d 65 6e 74 73 3a | 0a 61 20 62 75 66 66 65 |guments:|.a buffe|
|00004820| 72 20 6f 72 20 74 68 65 | 20 6e 61 6d 65 20 6f 66 |r or the| name of|
|00004830| 20 6f 6e 65 2c 20 61 6e | 64 20 74 77 6f 20 63 68 | one, an|d two ch|
|00004840| 61 72 61 63 74 65 72 20 | 6e 75 6d 62 65 72 73 0a |aracter |numbers.|
|00004850| 73 70 65 63 69 66 79 69 | 6e 67 20 74 68 65 20 70 |specifyi|ng the p|
|00004860| 6f 72 74 69 6f 6e 20 6f | 66 20 74 68 65 20 63 75 |ortion o|f the cu|
|00004870| 72 72 65 6e 74 20 62 75 | 66 66 65 72 20 74 6f 20 |rrent bu|ffer to |
|00004880| 62 65 20 63 6f 70 69 65 | 64 2e 22 20 28 69 6e 74 |be copie|d." (int|
|00004890| 65 72 61 63 74 69 76 65 | 20 22 42 50 72 65 70 65 |eractive| "BPrepe|
|000048a0| 6e 64 20 74 6f 20 62 75 | 66 66 65 72 3a 20 0a 72 |nd to bu|ffer: .r|
|000048b0| 22 29 20 28 62 79 74 65 | 2d 63 6f 64 65 20 22 c4 |") (byte|-code ".|
|000048c0| 88 70 18 8a c5 09 21 71 | 88 8a c6 08 0a 0b 23 29 |.p....!q|......#)|
|000048d0| 29 29 87 22 20 5b 6f 6c | 64 62 75 66 20 62 75 66 |))." [ol|dbuf buf|
|000048e0| 66 65 72 20 73 74 61 72 | 74 20 65 6e 64 20 6e 69 |fer star|t end ni|
|000048f0| 6c 20 67 65 74 2d 62 75 | 66 66 65 72 2d 63 72 65 |l get-bu|ffer-cre|
|00004900| 61 74 65 20 69 6e 73 65 | 72 74 2d 62 75 66 66 65 |ate inse|rt-buffe|
|00004910| 72 2d 73 75 62 73 74 72 | 69 6e 67 5d 20 35 29 29 |r-substr|ing] 5))|
|00004920| 0a 0a 28 64 65 66 75 6e | 20 63 6f 70 79 2d 74 6f |..(defun| copy-to|
|00004930| 2d 62 75 66 66 65 72 20 | 28 62 75 66 66 65 72 20 |-buffer |(buffer |
|00004940| 73 74 61 72 74 20 65 6e | 64 29 20 22 5c 0a 43 6f |start en|d) "\.Co|
|00004950| 70 79 20 74 6f 20 73 70 | 65 63 69 66 69 65 64 20 |py to sp|ecified |
|00004960| 62 75 66 66 65 72 20 74 | 68 65 20 74 65 78 74 20 |buffer t|he text |
|00004970| 6f 66 20 74 68 65 20 72 | 65 67 69 6f 6e 2e 0a 49 |of the r|egion..I|
|00004980| 74 20 69 73 20 69 6e 73 | 65 72 74 65 64 20 69 6e |t is ins|erted in|
|00004990| 74 6f 20 74 68 61 74 20 | 62 75 66 66 65 72 2c 20 |to that |buffer, |
|000049a0| 72 65 70 6c 61 63 69 6e | 67 20 65 78 69 73 74 69 |replacin|g existi|
|000049b0| 6e 67 20 74 65 78 74 20 | 74 68 65 72 65 2e 0a 0a |ng text |there...|
|000049c0| 57 68 65 6e 20 63 61 6c | 6c 69 6e 67 20 66 72 6f |When cal|ling fro|
|000049d0| 6d 20 61 20 70 72 6f 67 | 72 61 6d 2c 20 67 69 76 |m a prog|ram, giv|
|000049e0| 65 20 74 68 72 65 65 20 | 61 72 67 75 6d 65 6e 74 |e three |argument|
|000049f0| 73 3a 0a 61 20 62 75 66 | 66 65 72 20 6f 72 20 74 |s:.a buf|fer or t|
|00004a00| 68 65 20 6e 61 6d 65 20 | 6f 66 20 6f 6e 65 2c 20 |he name |of one, |
|00004a10| 61 6e 64 20 74 77 6f 20 | 63 68 61 72 61 63 74 65 |and two |characte|
|00004a20| 72 20 6e 75 6d 62 65 72 | 73 0a 73 70 65 63 69 66 |r number|s.specif|
|00004a30| 79 69 6e 67 20 74 68 65 | 20 70 6f 72 74 69 6f 6e |ying the| portion|
|00004a40| 20 6f 66 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 | of the |current |
|00004a50| 62 75 66 66 65 72 20 74 | 6f 20 62 65 20 63 6f 70 |buffer t|o be cop|
|00004a60| 69 65 64 2e 22 20 28 69 | 6e 74 65 72 61 63 74 69 |ied." (i|nteracti|
|00004a70| 76 65 20 22 42 43 6f 70 | 79 20 74 6f 20 62 75 66 |ve "BCop|y to buf|
|00004a80| 66 65 72 3a 20 0a 72 22 | 29 20 28 62 79 74 65 2d |fer: .r"|) (byte-|
|00004a90| 63 6f 64 65 20 22 c4 88 | 70 18 8a c5 09 21 71 88 |code "..|p....!q.|
|00004aa0| c6 20 88 8a c7 08 0a 0b | 23 29 29 29 87 22 20 5b |. ......|#)))." [|
|00004ab0| 6f 6c 64 62 75 66 20 62 | 75 66 66 65 72 20 73 74 |oldbuf b|uffer st|
|00004ac0| 61 72 74 20 65 6e 64 20 | 6e 69 6c 20 67 65 74 2d |art end |nil get-|
|00004ad0| 62 75 66 66 65 72 2d 63 | 72 65 61 74 65 20 65 72 |buffer-c|reate er|
|00004ae0| 61 73 65 2d 62 75 66 66 | 65 72 20 69 6e 73 65 72 |ase-buff|er inser|
|00004af0| 74 2d 62 75 66 66 65 72 | 2d 73 75 62 73 74 72 69 |t-buffer|-substri|
|00004b00| 6e 67 5d 20 36 29 29 0a | 0a 28 64 65 66 75 6e 20 |ng] 6)).|.(defun |
|00004b10| 6d 61 72 6b 20 6e 69 6c | 20 22 5c 0a 52 65 74 75 |mark nil| "\.Retu|
|00004b20| 72 6e 20 74 68 69 73 20 | 62 75 66 66 65 72 27 73 |rn this |buffer's|
|00004b30| 20 6d 61 72 6b 20 76 61 | 6c 75 65 20 61 73 20 69 | mark va|lue as i|
|00004b40| 6e 74 65 67 65 72 2c 20 | 6f 72 20 6e 69 6c 20 69 |nteger, |or nil i|
|00004b50| 66 20 6e 6f 20 6d 61 72 | 6b 2e 0a 49 66 20 79 6f |f no mar|k..If yo|
|00004b60| 75 20 61 72 65 20 75 73 | 69 6e 67 20 74 68 69 73 |u are us|ing this|
|00004b70| 20 69 6e 20 61 6e 20 65 | 64 69 74 69 6e 67 20 63 | in an e|diting c|
|00004b80| 6f 6d 6d 61 6e 64 2c 20 | 79 6f 75 20 61 72 65 20 |ommand, |you are |
|00004b90| 6d 6f 73 74 20 6c 69 6b | 65 6c 79 20 6d 61 6b 69 |most lik|ely maki|
|00004ba0| 6e 67 0a 61 20 6d 69 73 | 74 61 6b 65 3b 20 73 65 |ng.a mis|take; se|
|00004bb0| 65 20 74 68 65 20 64 6f | 63 75 6d 65 6e 74 61 74 |e the do|cumentat|
|00004bc0| 69 6f 6e 20 6f 66 20 60 | 73 65 74 2d 6d 61 72 6b |ion of `|set-mark|
|00004bd0| 27 2e 22 20 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |'." (byt|e-code "|
|00004be0| c0 c1 20 21 87 22 20 5b | 6d 61 72 6b 65 72 2d 70 |.. !." [|marker-p|
|00004bf0| 6f 73 69 74 69 6f 6e 20 | 6d 61 72 6b 2d 6d 61 72 |osition |mark-mar|
|00004c00| 6b 65 72 5d 20 33 29 29 | 0a 0a 28 64 65 66 75 6e |ker] 3))|..(defun|
|00004c10| 20 73 65 74 2d 6d 61 72 | 6b 20 28 70 6f 73 29 20 | set-mar|k (pos) |
|00004c20| 22 5c 0a 53 65 74 20 74 | 68 69 73 20 62 75 66 66 |"\.Set t|his buff|
|00004c30| 65 72 27 73 20 6d 61 72 | 6b 20 74 6f 20 50 4f 53 |er's mar|k to POS|
|00004c40| 2e 20 20 44 6f 6e 27 74 | 20 75 73 65 20 74 68 69 |. Don't| use thi|
|00004c50| 73 20 66 75 6e 63 74 69 | 6f 6e 21 0a 54 68 61 74 |s functi|on!.That|
|00004c60| 20 69 73 20 74 6f 20 73 | 61 79 2c 20 64 6f 6e 27 | is to s|ay, don'|
|00004c70| 74 20 75 73 65 20 74 68 | 69 73 20 66 75 6e 63 74 |t use th|is funct|
|00004c80| 69 6f 6e 20 75 6e 6c 65 | 73 73 20 79 6f 75 20 77 |ion unle|ss you w|
|00004c90| 61 6e 74 0a 74 68 65 20 | 75 73 65 72 20 74 6f 20 |ant.the |user to |
|00004ca0| 73 65 65 20 74 68 61 74 | 20 74 68 65 20 6d 61 72 |see that| the mar|
|00004cb0| 6b 20 68 61 73 20 6d 6f | 76 65 64 2c 20 61 6e 64 |k has mo|ved, and|
|00004cc0| 20 79 6f 75 20 77 61 6e | 74 20 74 68 65 20 70 72 | you wan|t the pr|
|00004cd0| 65 76 69 6f 75 73 0a 6d | 61 72 6b 20 70 6f 73 69 |evious.m|ark posi|
|00004ce0| 74 69 6f 6e 20 74 6f 20 | 62 65 20 6c 6f 73 74 2e |tion to |be lost.|
|00004cf0| 0a 0a 4e 6f 72 6d 61 6c | 6c 79 2c 20 77 68 65 6e |..Normal|ly, when|
|00004d00| 20 61 20 6e 65 77 20 6d | 61 72 6b 20 69 73 20 73 | a new m|ark is s|
|00004d10| 65 74 2c 20 74 68 65 20 | 6f 6c 64 20 6f 6e 65 20 |et, the |old one |
|00004d20| 73 68 6f 75 6c 64 20 67 | 6f 20 6f 6e 20 74 68 65 |should g|o on the|
|00004d30| 20 73 74 61 63 6b 2e 0a | 54 68 69 73 20 69 73 20 | stack..|This is |
|00004d40| 77 68 79 20 6d 6f 73 74 | 20 61 70 70 6c 69 63 61 |why most| applica|
|00004d50| 74 69 6f 6e 73 20 73 68 | 6f 75 6c 64 20 75 73 65 |tions sh|ould use|
|00004d60| 20 70 75 73 68 2d 6d 61 | 72 6b 2c 20 6e 6f 74 20 | push-ma|rk, not |
|00004d70| 73 65 74 2d 6d 61 72 6b | 2e 0a 0a 4e 6f 76 69 63 |set-mark|...Novic|
|00004d80| 65 20 65 6d 61 63 73 2d | 6c 69 73 70 20 70 72 6f |e emacs-|lisp pro|
|00004d90| 67 72 61 6d 6d 65 72 73 | 20 6f 66 74 65 6e 20 74 |grammers| often t|
|00004da0| 72 79 20 74 6f 20 75 73 | 65 20 74 68 65 20 6d 61 |ry to us|e the ma|
|00004db0| 72 6b 20 66 6f 72 20 74 | 68 65 20 77 72 6f 6e 67 |rk for t|he wrong|
|00004dc0| 0a 70 75 72 70 6f 73 65 | 73 2e 20 20 54 68 65 20 |.purpose|s. The |
|00004dd0| 6d 61 72 6b 20 73 61 76 | 65 73 20 61 20 6c 6f 63 |mark sav|es a loc|
|00004de0| 61 74 69 6f 6e 20 66 6f | 72 20 74 68 65 20 75 73 |ation fo|r the us|
|00004df0| 65 72 27 73 20 63 6f 6e | 76 65 6e 69 65 6e 63 65 |er's con|venience|
|00004e00| 2e 0a 4d 6f 73 74 20 65 | 64 69 74 69 6e 67 20 63 |..Most e|diting c|
|00004e10| 6f 6d 6d 61 6e 64 73 20 | 73 68 6f 75 6c 64 20 6e |ommands |should n|
|00004e20| 6f 74 20 61 6c 74 65 72 | 20 74 68 65 20 6d 61 72 |ot alter| the mar|
|00004e30| 6b 2e 0a 54 6f 20 72 65 | 6d 65 6d 62 65 72 20 61 |k..To re|member a|
|00004e40| 20 6c 6f 63 61 74 69 6f | 6e 20 66 6f 72 20 69 6e | locatio|n for in|
|00004e50| 74 65 72 6e 61 6c 20 75 | 73 65 20 69 6e 20 74 68 |ternal u|se in th|
|00004e60| 65 20 4c 69 73 70 20 70 | 72 6f 67 72 61 6d 2c 0a |e Lisp p|rogram,.|
|00004e70| 73 74 6f 72 65 20 69 74 | 20 69 6e 20 61 20 4c 69 |store it| in a Li|
|00004e80| 73 70 20 76 61 72 69 61 | 62 6c 65 2e 20 20 45 78 |sp varia|ble. Ex|
|00004e90| 61 6d 70 6c 65 3a 0a 0a | 20 20 20 28 6c 65 74 20 |ample:..| (let |
|00004ea0| 28 28 62 65 67 20 28 70 | 6f 69 6e 74 29 29 29 20 |((beg (p|oint))) |
|00004eb0| 28 66 6f 72 77 61 72 64 | 2d 6c 69 6e 65 20 31 29 |(forward|-line 1)|
|00004ec0| 20 28 64 65 6c 65 74 65 | 2d 72 65 67 69 6f 6e 20 | (delete|-region |
|00004ed0| 62 65 67 20 28 70 6f 69 | 6e 74 29 29 29 2e 22 20 |beg (poi|nt)))." |
|00004ee0| 28 62 79 74 65 2d 63 6f | 64 65 20 22 c1 c2 20 08 |(byte-co|de ".. .|
|00004ef0| 70 23 87 22 20 5b 70 6f | 73 20 73 65 74 2d 6d 61 |p#." [po|s set-ma|
|00004f00| 72 6b 65 72 20 6d 61 72 | 6b 2d 6d 61 72 6b 65 72 |rker mar|k-marker|
|00004f10| 5d 20 35 29 29 0a 0a 28 | 64 65 66 76 61 72 20 6d |] 5))..(|defvar m|
|00004f20| 61 72 6b 2d 72 69 6e 67 | 20 6e 69 6c 20 22 5c 0a |ark-ring| nil "\.|
|00004f30| 54 68 65 20 6c 69 73 74 | 20 6f 66 20 73 61 76 65 |The list| of save|
|00004f40| 64 20 66 6f 72 6d 65 72 | 20 6d 61 72 6b 73 20 6f |d former| marks o|
|00004f50| 66 20 74 68 65 20 63 75 | 72 72 65 6e 74 20 62 75 |f the cu|rrent bu|
|00004f60| 66 66 65 72 2c 0a 6d 6f | 73 74 20 72 65 63 65 6e |ffer,.mo|st recen|
|00004f70| 74 20 66 69 72 73 74 2e | 22 29 0a 0a 28 6d 61 6b |t first.|")..(mak|
|00004f80| 65 2d 76 61 72 69 61 62 | 6c 65 2d 62 75 66 66 65 |e-variab|le-buffe|
|00004f90| 72 2d 6c 6f 63 61 6c 20 | 28 71 75 6f 74 65 20 6d |r-local |(quote m|
|00004fa0| 61 72 6b 2d 72 69 6e 67 | 29 29 0a 0a 28 64 65 66 |ark-ring|))..(def|
|00004fb0| 63 6f 6e 73 74 20 6d 61 | 72 6b 2d 72 69 6e 67 2d |const ma|rk-ring-|
|00004fc0| 6d 61 78 20 31 36 20 22 | 5c 0a 2a 4d 61 78 69 6d |max 16 "|\.*Maxim|
|00004fd0| 75 6d 20 73 69 7a 65 20 | 6f 66 20 6d 61 72 6b 20 |um size |of mark |
|00004fe0| 72 69 6e 67 2e 20 20 53 | 74 61 72 74 20 64 69 73 |ring. S|tart dis|
|00004ff0| 63 61 72 64 69 6e 67 20 | 6f 66 66 20 65 6e 64 20 |carding |off end |
|00005000| 69 66 20 67 65 74 73 20 | 74 68 69 73 20 62 69 67 |if gets |this big|
|00005010| 2e 22 29 0a 0a 28 64 65 | 66 75 6e 20 73 65 74 2d |.")..(de|fun set-|
|00005020| 6d 61 72 6b 2d 63 6f 6d | 6d 61 6e 64 20 28 61 72 |mark-com|mand (ar|
|00005030| 67 29 20 22 5c 0a 53 65 | 74 20 6d 61 72 6b 20 61 |g) "\.Se|t mark a|
|00005040| 74 20 77 68 65 72 65 20 | 70 6f 69 6e 74 20 69 73 |t where |point is|
|00005050| 2c 20 6f 72 20 6a 75 6d | 70 20 74 6f 20 6d 61 72 |, or jum|p to mar|
|00005060| 6b 2e 0a 57 69 74 68 20 | 6e 6f 20 70 72 65 66 69 |k..With |no prefi|
|00005070| 78 20 61 72 67 75 6d 65 | 6e 74 2c 20 73 65 74 20 |x argume|nt, set |
|00005080| 6d 61 72 6b 2c 20 61 6e | 64 20 70 75 73 68 20 70 |mark, an|d push p|
|00005090| 72 65 76 69 6f 75 73 20 | 6d 61 72 6b 20 6f 6e 20 |revious |mark on |
|000050a0| 6d 61 72 6b 20 72 69 6e | 67 2e 0a 57 69 74 68 20 |mark rin|g..With |
|000050b0| 61 72 67 75 6d 65 6e 74 | 2c 20 6a 75 6d 70 20 74 |argument|, jump t|
|000050c0| 6f 20 6d 61 72 6b 2c 20 | 61 6e 64 20 70 6f 70 20 |o mark, |and pop |
|000050d0| 69 6e 74 6f 20 6d 61 72 | 6b 20 6f 66 66 20 74 68 |into mar|k off th|
|000050e0| 65 20 6d 61 72 6b 20 72 | 69 6e 67 2e 0a 0a 4e 6f |e mark r|ing...No|
|000050f0| 76 69 63 65 20 65 6d 61 | 63 73 2d 6c 69 73 70 20 |vice ema|cs-lisp |
|00005100| 70 72 6f 67 72 61 6d 6d | 65 72 73 20 6f 66 74 65 |programm|ers ofte|
|00005110| 6e 20 74 72 79 20 74 6f | 20 75 73 65 20 74 68 65 |n try to| use the|
|00005120| 20 6d 61 72 6b 20 66 6f | 72 20 74 68 65 20 77 72 | mark fo|r the wr|
|00005130| 6f 6e 67 0a 70 75 72 70 | 6f 73 65 73 2e 20 20 53 |ong.purp|oses. S|
|00005140| 65 65 20 74 68 65 20 64 | 6f 63 75 6d 65 6e 74 61 |ee the d|ocumenta|
|00005150| 74 69 6f 6e 20 6f 66 20 | 60 73 65 74 2d 6d 61 72 |tion of |`set-mar|
|00005160| 6b 27 20 66 6f 72 20 6d | 6f 72 65 20 69 6e 66 6f |k' for m|ore info|
|00005170| 72 6d 61 74 69 6f 6e 2e | 22 20 28 69 6e 74 65 72 |rmation.|" (inter|
|00005180| 61 63 74 69 76 65 20 22 | 50 22 29 20 28 62 79 74 |active "|P") (byt|
|00005190| 65 2d 63 6f 64 65 20 22 | c1 88 08 3f 83 0c 00 c2 |e-code "|...?....|
|000051a0| 20 82 1e 00 c3 20 3f 83 | 18 00 c4 c5 21 82 1e 00 | .... ?.|....!...|
|000051b0| c3 20 62 88 c6 20 87 22 | 20 5b 61 72 67 20 6e 69 |. b.. ."| [arg ni|
|000051c0| 6c 20 70 75 73 68 2d 6d | 61 72 6b 20 6d 61 72 6b |l push-m|ark mark|
|000051d0| 20 65 72 72 6f 72 20 22 | 4e 6f 20 6d 61 72 6b 20 | error "|No mark |
|000051e0| 73 65 74 20 69 6e 20 74 | 68 69 73 20 62 75 66 66 |set in t|his buff|
|000051f0| 65 72 22 20 70 6f 70 2d | 6d 61 72 6b 5d 20 36 29 |er" pop-|mark] 6)|
|00005200| 29 0a 0a 28 64 65 66 75 | 6e 20 70 75 73 68 2d 6d |)..(defu|n push-m|
|00005210| 61 72 6b 20 28 26 6f 70 | 74 69 6f 6e 61 6c 20 6c |ark (&op|tional l|
|00005220| 6f 63 61 74 69 6f 6e 20 | 6e 6f 6d 73 67 29 20 22 |ocation |nomsg) "|
|00005230| 5c 0a 53 65 74 20 6d 61 | 72 6b 20 61 74 20 4c 4f |\.Set ma|rk at LO|
|00005240| 43 41 54 49 4f 4e 20 28 | 70 6f 69 6e 74 2c 20 62 |CATION (|point, b|
|00005250| 79 20 64 65 66 61 75 6c | 74 29 20 61 6e 64 20 70 |y defaul|t) and p|
|00005260| 75 73 68 20 6f 6c 64 20 | 6d 61 72 6b 20 6f 6e 20 |ush old |mark on |
|00005270| 6d 61 72 6b 20 72 69 6e | 67 2e 0a 44 69 73 70 6c |mark rin|g..Displ|
|00005280| 61 79 73 20 5c 22 4d 61 | 72 6b 20 73 65 74 5c 22 |ays \"Ma|rk set\"|
|00005290| 20 75 6e 6c 65 73 73 20 | 74 68 65 20 6f 70 74 69 | unless |the opti|
|000052a0| 6f 6e 61 6c 20 73 65 63 | 6f 6e 64 20 61 72 67 20 |onal sec|ond arg |
|000052b0| 4e 4f 4d 53 47 20 69 73 | 20 6e 6f 6e 2d 6e 69 6c |NOMSG is| non-nil|
|000052c0| 2e 0a 0a 4e 6f 76 69 63 | 65 20 65 6d 61 63 73 2d |...Novic|e emacs-|
|000052d0| 6c 69 73 70 20 70 72 6f | 67 72 61 6d 6d 65 72 73 |lisp pro|grammers|
|000052e0| 20 6f 66 74 65 6e 20 74 | 72 79 20 74 6f 20 75 73 | often t|ry to us|
|000052f0| 65 20 74 68 65 20 6d 61 | 72 6b 20 66 6f 72 20 74 |e the ma|rk for t|
|00005300| 68 65 20 77 72 6f 6e 67 | 0a 70 75 72 70 6f 73 65 |he wrong|.purpose|
|00005310| 73 2e 20 20 53 65 65 20 | 74 68 65 20 64 6f 63 75 |s. See |the docu|
|00005320| 6d 65 6e 74 61 74 69 6f | 6e 20 6f 66 20 60 73 65 |mentatio|n of `se|
|00005330| 74 2d 6d 61 72 6b 27 20 | 66 6f 72 20 6d 6f 72 65 |t-mark' |for more|
|00005340| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 2e 22 20 28 | informa|tion." (|
|00005350| 62 79 74 65 2d 63 6f 64 | 65 20 22 c6 20 3f 83 0a |byte-cod|e ". ?..|
|00005360| 00 c0 82 2b 00 c7 c8 20 | 21 09 42 89 11 88 09 47 |...+... |!.B....G|
|00005370| 0a 56 85 2b 00 c9 ca 0a | 09 5c 22 40 c0 5c 22 88 |.V.+....|.\"@.\".|
|00005380| cb ca 0a 53 09 5c 22 c0 | 5c 22 88 cc 0b 86 32 00 |...S.\".|\"....2.|
|00005390| 60 21 88 0c 86 46 00 0d | 86 46 00 cd 20 ce 56 86 |`!...F..|.F.. .V.|
|000053a0| 46 00 cf d0 21 87 22 20 | 5b 6e 69 6c 20 6d 61 72 |F...!." |[nil mar|
|000053b0| 6b 2d 72 69 6e 67 20 6d | 61 72 6b 2d 72 69 6e 67 |k-ring m|ark-ring|
|000053c0| 2d 6d 61 78 20 6c 6f 63 | 61 74 69 6f 6e 20 6e 6f |-max loc|ation no|
|000053d0| 6d 73 67 20 65 78 65 63 | 75 74 69 6e 67 2d 6d 61 |msg exec|uting-ma|
|000053e0| 63 72 6f 20 6d 61 72 6b | 20 63 6f 70 79 2d 6d 61 |cro mark| copy-ma|
|000053f0| 72 6b 65 72 20 6d 61 72 | 6b 2d 6d 61 72 6b 65 72 |rker mar|k-marker|
|00005400| 20 6d 6f 76 65 2d 6d 61 | 72 6b 65 72 20 6e 74 68 | move-ma|rker nth|
|00005410| 63 64 72 20 73 65 74 63 | 64 72 20 73 65 74 2d 6d |cdr setc|dr set-m|
|00005420| 61 72 6b 20 6d 69 6e 69 | 62 75 66 66 65 72 2d 64 |ark mini|buffer-d|
|00005430| 65 70 74 68 20 30 20 6d | 65 73 73 61 67 65 20 22 |epth 0 m|essage "|
|00005440| 4d 61 72 6b 20 73 65 74 | 22 5d 20 31 31 29 29 0a |Mark set|"] 11)).|
|00005450| 0a 28 64 65 66 75 6e 20 | 70 6f 70 2d 6d 61 72 6b |.(defun |pop-mark|
|00005460| 20 6e 69 6c 20 22 5c 0a | 50 6f 70 20 6f 66 66 20 | nil "\.|Pop off |
|00005470| 6d 61 72 6b 20 72 69 6e | 67 20 69 6e 74 6f 20 74 |mark rin|g into t|
|00005480| 68 65 20 62 75 66 66 65 | 72 27 73 20 61 63 74 75 |he buffe|r's actu|
|00005490| 61 6c 20 6d 61 72 6b 2e | 0a 44 6f 65 73 20 6e 6f |al mark.|.Does no|
|000054a0| 74 20 73 65 74 20 70 6f | 69 6e 74 2e 20 20 44 6f |t set po|int. Do|
|000054b0| 65 73 20 6e 6f 74 68 69 | 6e 67 20 69 66 20 6d 61 |es nothi|ng if ma|
|000054c0| 72 6b 20 72 69 6e 67 20 | 69 73 20 65 6d 70 74 79 |rk ring |is empty|
|000054d0| 2e 22 20 28 62 79 74 65 | 2d 63 6f 64 65 20 22 08 |." (byte|-code ".|
|000054e0| 85 29 00 c2 08 c3 c4 20 | 21 43 5c 22 89 10 88 c5 |.)..... |!C\"....|
|000054f0| c6 08 40 5c 5c 21 88 c7 | 08 40 c1 5c 22 88 c8 20 |..@\\!..|.@.\".. |
|00005500| 3f 85 24 00 c9 20 88 08 | 41 89 10 87 22 20 5b 6d |?.$.. ..|A..." [m|
|00005510| 61 72 6b 2d 72 69 6e 67 | 20 6e 69 6c 20 6e 63 6f |ark-ring| nil nco|
|00005520| 6e 63 20 63 6f 70 79 2d | 6d 61 72 6b 65 72 20 6d |nc copy-|marker m|
|00005530| 61 72 6b 2d 6d 61 72 6b | 65 72 20 73 65 74 2d 6d |ark-mark|er set-m|
|00005540| 61 72 6b 20 30 20 6d 6f | 76 65 2d 6d 61 72 6b 65 |ark 0 mo|ve-marke|
|00005550| 72 20 6d 61 72 6b 20 64 | 69 6e 67 5d 20 39 29 29 |r mark d|ing] 9))|
|00005560| 0a 0a 28 66 73 65 74 20 | 28 71 75 6f 74 65 20 65 |..(fset |(quote e|
|00005570| 78 63 68 61 6e 67 65 2d | 64 6f 74 2d 61 6e 64 2d |xchange-|dot-and-|
|00005580| 6d 61 72 6b 29 20 28 71 | 75 6f 74 65 20 65 78 63 |mark) (q|uote exc|
|00005590| 68 61 6e 67 65 2d 70 6f | 69 6e 74 2d 61 6e 64 2d |hange-po|int-and-|
|000055a0| 6d 61 72 6b 29 29 0a 0a | 28 64 65 66 75 6e 20 65 |mark))..|(defun e|
|000055b0| 78 63 68 61 6e 67 65 2d | 70 6f 69 6e 74 2d 61 6e |xchange-|point-an|
|000055c0| 64 2d 6d 61 72 6b 20 6e | 69 6c 20 22 5c 0a 50 75 |d-mark n|il "\.Pu|
|000055d0| 74 20 74 68 65 20 6d 61 | 72 6b 20 77 68 65 72 65 |t the ma|rk where|
|000055e0| 20 70 6f 69 6e 74 20 69 | 73 20 6e 6f 77 2c 20 61 | point i|s now, a|
|000055f0| 6e 64 20 70 6f 69 6e 74 | 20 77 68 65 72 65 20 74 |nd point| where t|
|00005600| 68 65 20 6d 61 72 6b 20 | 69 73 20 6e 6f 77 2e 22 |he mark |is now."|
|00005610| 20 28 69 6e 74 65 72 61 | 63 74 69 76 65 20 6e 69 | (intera|ctive ni|
|00005620| 6c 29 20 28 62 79 74 65 | 2d 63 6f 64 65 20 22 c0 |l) (byte|-code ".|
|00005630| 88 c2 20 19 09 3f 85 0d | 00 c3 c4 21 88 c5 60 21 |.. ..?..|...!..`!|
|00005640| 88 09 62 88 c0 29 87 22 | 20 5b 6e 69 6c 20 6f 6d |..b..)."| [nil om|
|00005650| 61 72 6b 20 6d 61 72 6b | 20 65 72 72 6f 72 20 22 |ark mark| error "|
|00005660| 4e 6f 20 6d 61 72 6b 20 | 73 65 74 20 69 6e 20 74 |No mark |set in t|
|00005670| 68 69 73 20 62 75 66 66 | 65 72 22 20 73 65 74 2d |his buff|er" set-|
|00005680| 6d 61 72 6b 5d 20 34 29 | 29 0a 0a 28 64 65 66 75 |mark] 4)|)..(defu|
|00005690| 6e 20 6e 65 78 74 2d 6c | 69 6e 65 20 28 61 72 67 |n next-l|ine (arg|
|000056a0| 29 20 22 5c 0a 4d 6f 76 | 65 20 63 75 72 73 6f 72 |) "\.Mov|e cursor|
|000056b0| 20 76 65 72 74 69 63 61 | 6c 6c 79 20 64 6f 77 6e | vertica|lly down|
|000056c0| 20 41 52 47 20 6c 69 6e | 65 73 2e 0a 49 66 20 74 | ARG lin|es..If t|
|000056d0| 68 65 72 65 20 69 73 20 | 6e 6f 20 63 68 61 72 61 |here is |no chara|
|000056e0| 63 74 65 72 20 69 6e 20 | 74 68 65 20 74 61 72 67 |cter in |the targ|
|000056f0| 65 74 20 6c 69 6e 65 20 | 65 78 61 63 74 6c 79 20 |et line |exactly |
|00005700| 75 6e 64 65 72 20 74 68 | 65 20 63 75 72 72 65 6e |under th|e curren|
|00005710| 74 20 63 6f 6c 75 6d 6e | 2c 0a 74 68 65 20 63 75 |t column|,.the cu|
|00005720| 72 73 6f 72 20 69 73 20 | 70 6f 73 69 74 69 6f 6e |rsor is |position|
|00005730| 65 64 20 61 66 74 65 72 | 20 74 68 65 20 63 68 61 |ed after| the cha|
|00005740| 72 61 63 74 65 72 20 69 | 6e 20 74 68 61 74 20 6c |racter i|n that l|
|00005750| 69 6e 65 20 77 68 69 63 | 68 20 73 70 61 6e 73 20 |ine whic|h spans |
|00005760| 74 68 69 73 0a 63 6f 6c | 75 6d 6e 2c 20 6f 72 20 |this.col|umn, or |
|00005770| 61 74 20 74 68 65 20 65 | 6e 64 20 6f 66 20 74 68 |at the e|nd of th|
|00005780| 65 20 6c 69 6e 65 20 69 | 66 20 69 74 20 69 73 20 |e line i|f it is |
|00005790| 6e 6f 74 20 6c 6f 6e 67 | 20 65 6e 6f 75 67 68 2e |not long| enough.|
|000057a0| 0a 49 66 20 74 68 65 72 | 65 20 69 73 20 6e 6f 20 |.If ther|e is no |
|000057b0| 6c 69 6e 65 20 69 6e 20 | 74 68 65 20 62 75 66 66 |line in |the buff|
|000057c0| 65 72 20 61 66 74 65 72 | 20 74 68 69 73 20 6f 6e |er after| this on|
|000057d0| 65 2c 0a 61 20 6e 65 77 | 6c 69 6e 65 20 63 68 61 |e,.a new|line cha|
|000057e0| 72 61 63 74 65 72 20 69 | 73 20 69 6e 73 65 72 74 |racter i|s insert|
|000057f0| 65 64 20 74 6f 20 63 72 | 65 61 74 65 20 61 20 6c |ed to cr|eate a l|
|00005800| 69 6e 65 0a 61 6e 64 20 | 74 68 65 20 63 75 72 73 |ine.and |the curs|
|00005810| 6f 72 20 6d 6f 76 65 73 | 20 74 6f 20 74 68 61 74 |or moves| to that|
|00005820| 20 6c 69 6e 65 2e 0a 0a | 54 68 65 20 63 6f 6d 6d | line...|The comm|
|00005830| 61 6e 64 20 5c 5c 5b 73 | 65 74 2d 67 6f 61 6c 2d |and \\[s|et-goal-|
|00005840| 63 6f 6c 75 6d 6e 5d 20 | 63 61 6e 20 62 65 20 75 |column] |can be u|
|00005850| 73 65 64 20 74 6f 20 63 | 72 65 61 74 65 0a 61 20 |sed to c|reate.a |
|00005860| 73 65 6d 69 70 65 72 6d | 61 6e 65 6e 74 20 67 6f |semiperm|anent go|
|00005870| 61 6c 20 63 6f 6c 75 6d | 6e 20 74 6f 20 77 68 69 |al colum|n to whi|
|00005880| 63 68 20 74 68 69 73 20 | 63 6f 6d 6d 61 6e 64 20 |ch this |command |
|00005890| 61 6c 77 61 79 73 20 6d | 6f 76 65 73 2e 0a 54 68 |always m|oves..Th|
|000058a0| 65 6e 20 69 74 20 64 6f | 65 73 20 6e 6f 74 20 74 |en it do|es not t|
|000058b0| 72 79 20 74 6f 20 6d 6f | 76 65 20 76 65 72 74 69 |ry to mo|ve verti|
|000058c0| 63 61 6c 6c 79 2e 0a 0a | 49 66 20 79 6f 75 20 61 |cally...|If you a|
|000058d0| 72 65 20 74 68 69 6e 6b | 69 6e 67 20 6f 66 20 75 |re think|ing of u|
|000058e0| 73 69 6e 67 20 74 68 69 | 73 20 69 6e 20 61 20 4c |sing thi|s in a L|
|000058f0| 69 73 70 20 70 72 6f 67 | 72 61 6d 2c 20 63 6f 6e |isp prog|ram, con|
|00005900| 73 69 64 65 72 0a 75 73 | 69 6e 67 20 60 66 6f 72 |sider.us|ing `for|
|00005910| 77 61 72 64 2d 6c 69 6e | 65 27 20 69 6e 73 74 65 |ward-lin|e' inste|
|00005920| 61 64 2e 20 20 49 74 20 | 69 73 20 75 73 75 61 6c |ad. It |is usual|
|00005930| 6c 79 20 65 61 73 69 65 | 72 20 74 6f 20 75 73 65 |ly easie|r to use|
|00005940| 0a 61 6e 64 20 6d 6f 72 | 65 20 72 65 6c 69 61 62 |.and mor|e reliab|
|00005950| 6c 65 20 28 6e 6f 20 64 | 65 70 65 6e 64 65 6e 63 |le (no d|ependenc|
|00005960| 65 20 6f 6e 20 67 6f 61 | 6c 20 63 6f 6c 75 6d 6e |e on goa|l column|
|00005970| 2c 20 65 74 63 2e 29 2e | 22 20 28 69 6e 74 65 72 |, etc.).|" (inter|
|00005980| 61 63 74 69 76 65 20 22 | 70 22 29 20 28 62 79 74 |active "|p") (byt|
|00005990| 65 2d 63 6f 64 65 20 22 | c2 88 08 c3 55 83 2a 00 |e-code "|....U.*.|
|000059a0| 60 19 c4 c3 21 88 09 60 | 55 86 18 00 68 c5 3d 3f |`...!..`|U...h.=?|
|000059b0| 83 20 00 c5 63 82 26 00 | 09 62 88 c6 08 21 29 82 |. ..c.&.|.b...!).|
|000059c0| 2d 00 c6 08 21 88 c2 87 | 22 20 5b 61 72 67 20 6f |-...!...|" [arg o|
|000059d0| 70 6f 69 6e 74 20 6e 69 | 6c 20 31 20 66 6f 72 77 |point ni|l 1 forw|
|000059e0| 61 72 64 2d 6c 69 6e 65 | 20 31 30 20 6e 65 78 74 |ard-line| 10 next|
|000059f0| 2d 6c 69 6e 65 2d 69 6e | 74 65 72 6e 61 6c 5d 20 |-line-in|ternal] |
|00005a00| 34 29 29 0a 0a 28 64 65 | 66 75 6e 20 70 72 65 76 |4))..(de|fun prev|
|00005a10| 69 6f 75 73 2d 6c 69 6e | 65 20 28 61 72 67 29 20 |ious-lin|e (arg) |
|00005a20| 22 5c 0a 4d 6f 76 65 20 | 63 75 72 73 6f 72 20 76 |"\.Move |cursor v|
|00005a30| 65 72 74 69 63 61 6c 6c | 79 20 75 70 20 41 52 47 |erticall|y up ARG|
|00005a40| 20 6c 69 6e 65 73 2e 0a | 49 66 20 74 68 65 72 65 | lines..|If there|
|00005a50| 20 69 73 20 6e 6f 20 63 | 68 61 72 61 63 74 65 72 | is no c|haracter|
|00005a60| 20 69 6e 20 74 68 65 20 | 74 61 72 67 65 74 20 6c | in the |target l|
|00005a70| 69 6e 65 20 65 78 61 63 | 74 6c 79 20 6f 76 65 72 |ine exac|tly over|
|00005a80| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 63 6f 6c | the cur|rent col|
|00005a90| 75 6d 6e 2c 0a 74 68 65 | 20 63 75 72 73 6f 72 20 |umn,.the| cursor |
|00005aa0| 69 73 20 70 6f 73 69 74 | 69 6f 6e 65 64 20 61 66 |is posit|ioned af|
|00005ab0| 74 65 72 20 74 68 65 20 | 63 68 61 72 61 63 74 65 |ter the |characte|
|00005ac0| 72 20 69 6e 20 74 68 61 | 74 20 6c 69 6e 65 20 77 |r in tha|t line w|
|00005ad0| 68 69 63 68 20 73 70 61 | 6e 73 20 74 68 69 73 0a |hich spa|ns this.|
|00005ae0| 63 6f 6c 75 6d 6e 2c 20 | 6f 72 20 61 74 20 74 68 |column, |or at th|
|00005af0| 65 20 65 6e 64 20 6f 66 | 20 74 68 65 20 6c 69 6e |e end of| the lin|
|00005b00| 65 20 69 66 20 69 74 20 | 69 73 20 6e 6f 74 20 6c |e if it |is not l|
|00005b10| 6f 6e 67 20 65 6e 6f 75 | 67 68 2e 0a 0a 54 68 65 |ong enou|gh...The|
|00005b20| 20 63 6f 6d 6d 61 6e 64 | 20 5c 5c 5b 73 65 74 2d | command| \\[set-|
|00005b30| 67 6f 61 6c 2d 63 6f 6c | 75 6d 6e 5d 20 63 61 6e |goal-col|umn] can|
|00005b40| 20 62 65 20 75 73 65 64 | 20 74 6f 20 63 72 65 61 | be used| to crea|
|00005b50| 74 65 0a 61 20 73 65 6d | 69 70 65 72 6d 61 6e 65 |te.a sem|ipermane|
|00005b60| 6e 74 20 67 6f 61 6c 20 | 63 6f 6c 75 6d 6e 20 74 |nt goal |column t|
|00005b70| 6f 20 77 68 69 63 68 20 | 74 68 69 73 20 63 6f 6d |o which |this com|
|00005b80| 6d 61 6e 64 20 61 6c 77 | 61 79 73 20 6d 6f 76 65 |mand alw|ays move|
|00005b90| 73 2e 0a 54 68 65 6e 20 | 69 74 20 64 6f 65 73 20 |s..Then |it does |
|00005ba0| 6e 6f 74 20 74 72 79 20 | 74 6f 20 6d 6f 76 65 20 |not try |to move |
|00005bb0| 76 65 72 74 69 63 61 6c | 6c 79 2e 0a 0a 49 66 20 |vertical|ly...If |
|00005bc0| 79 6f 75 20 61 72 65 20 | 74 68 69 6e 6b 69 6e 67 |you are |thinking|
|00005bd0| 20 6f 66 20 75 73 69 6e | 67 20 74 68 69 73 20 69 | of usin|g this i|
|00005be0| 6e 20 61 20 4c 69 73 70 | 20 70 72 6f 67 72 61 6d |n a Lisp| program|
|00005bf0| 2c 20 63 6f 6e 73 69 64 | 65 72 20 75 73 69 6e 67 |, consid|er using|
|00005c00| 0a 60 66 6f 72 77 61 72 | 64 2d 6c 69 6e 65 27 20 |.`forwar|d-line' |
|00005c10| 77 69 74 68 20 6e 65 67 | 61 74 69 76 65 20 61 72 |with neg|ative ar|
|00005c20| 67 75 6d 65 6e 74 20 69 | 6e 73 74 65 61 64 2e 2e |gument i|nstead..|
|00005c30| 20 20 49 74 20 69 73 20 | 75 73 75 61 6c 6c 79 20 | It is |usually |
|00005c40| 65 61 73 69 65 72 0a 74 | 6f 20 75 73 65 20 61 6e |easier.t|o use an|
|00005c50| 64 20 6d 6f 72 65 20 72 | 65 6c 69 61 62 6c 65 20 |d more r|eliable |
|00005c60| 28 6e 6f 20 64 65 70 65 | 6e 64 65 6e 63 65 20 6f |(no depe|ndence o|
|00005c70| 6e 20 67 6f 61 6c 20 63 | 6f 6c 75 6d 6e 2c 20 65 |n goal c|olumn, e|
|00005c80| 74 63 2e 29 2e 22 20 28 | 69 6e 74 65 72 61 63 74 |tc.)." (|interact|
|00005c90| 69 76 65 20 22 70 22 29 | 20 28 62 79 74 65 2d 63 |ive "p")| (byte-c|
|00005ca0| 6f 64 65 20 22 c1 88 c2 | 08 5b 21 88 c1 87 22 20 |ode "...|.[!..." |
|00005cb0| 5b 61 72 67 20 6e 69 6c | 20 6e 65 78 74 2d 6c 69 |[arg nil| next-li|
|00005cc0| 6e 65 2d 69 6e 74 65 72 | 6e 61 6c 5d 20 32 29 29 |ne-inter|nal] 2))|
|00005cd0| 0a 0a 28 64 65 66 63 6f | 6e 73 74 20 74 72 61 63 |..(defco|nst trac|
|00005ce0| 6b 2d 65 6f 6c 20 6e 69 | 6c 20 22 5c 0a 2a 4e 6f |k-eol ni|l "\.*No|
|00005cf0| 6e 2d 6e 69 6c 20 6d 65 | 61 6e 73 20 76 65 72 74 |n-nil me|ans vert|
|00005d00| 69 63 61 6c 20 6d 6f 74 | 69 6f 6e 20 73 74 61 72 |ical mot|ion star|
|00005d10| 74 69 6e 67 20 61 74 20 | 74 68 65 20 65 6e 64 20 |ting at |the end |
|00005d20| 6f 66 20 61 20 6c 69 6e | 65 20 73 68 6f 75 6c 64 |of a lin|e should|
|00005d30| 20 6b 65 65 70 20 74 6f | 20 65 6e 64 73 20 6f 66 | keep to| ends of|
|00005d40| 20 6c 69 6e 65 73 2e 0a | 54 68 69 73 20 6d 65 61 | lines..|This mea|
|00005d50| 6e 73 20 6d 6f 76 69 6e | 67 20 74 6f 20 74 68 65 |ns movin|g to the|
|00005d60| 20 65 6e 64 20 6f 66 20 | 65 61 63 68 20 6c 69 6e | end of |each lin|
|00005d70| 65 20 6d 6f 76 65 64 20 | 6f 6e 74 6f 2e 22 29 0a |e moved |onto.").|
|00005d80| 0a 28 64 65 66 76 61 72 | 20 67 6f 61 6c 2d 63 6f |.(defvar| goal-co|
|00005d90| 6c 75 6d 6e 20 6e 69 6c | 20 22 5c 0a 2a 53 65 6d |lumn nil| "\.*Sem|
|00005da0| 69 70 65 72 6d 61 6e 65 | 6e 74 20 67 6f 61 6c 20 |ipermane|nt goal |
|00005db0| 63 6f 6c 75 6d 6e 20 66 | 6f 72 20 76 65 72 74 69 |column f|or verti|
|00005dc0| 63 61 6c 20 6d 6f 74 69 | 6f 6e 2c 20 61 73 20 73 |cal moti|on, as s|
|00005dd0| 65 74 20 62 79 20 5c 5c | 5b 73 65 74 2d 67 6f 61 |et by \\|[set-goa|
|00005de0| 6c 2d 63 6f 6c 75 6d 6e | 5d 2c 20 6f 72 20 6e 69 |l-column|], or ni|
|00005df0| 6c 2e 22 29 0a 0a 28 64 | 65 66 76 61 72 20 74 65 |l.")..(d|efvar te|
|00005e00| 6d 70 6f 72 61 72 79 2d | 67 6f 61 6c 2d 63 6f 6c |mporary-|goal-col|
|00005e10| 75 6d 6e 20 30 20 22 5c | 0a 43 75 72 72 65 6e 74 |umn 0 "\|.Current|
|00005e20| 20 67 6f 61 6c 20 63 6f | 6c 75 6d 6e 20 66 6f 72 | goal co|lumn for|
|00005e30| 20 76 65 72 74 69 63 61 | 6c 20 6d 6f 74 69 6f 6e | vertica|l motion|
|00005e40| 2e 0a 49 74 20 69 73 20 | 74 68 65 20 63 6f 6c 75 |..It is |the colu|
|00005e50| 6d 6e 20 77 68 65 72 65 | 20 70 6f 69 6e 74 20 77 |mn where| point w|
|00005e60| 61 73 20 61 74 20 74 68 | 65 20 73 74 61 72 74 20 |as at th|e start |
|00005e70| 6f 66 20 63 75 72 72 65 | 6e 74 20 72 75 6e 20 6f |of curre|nt run o|
|00005e80| 66 20 76 65 72 74 69 63 | 61 6c 20 6d 6f 74 69 6f |f vertic|al motio|
|00005e90| 6e 20 63 6f 6d 6d 61 6e | 64 73 2e 22 29 0a 0a 28 |n comman|ds.")..(|
|00005ea0| 64 65 66 75 6e 20 6e 65 | 78 74 2d 6c 69 6e 65 2d |defun ne|xt-line-|
|00005eb0| 69 6e 74 65 72 6e 61 6c | 20 28 61 72 67 29 20 28 |internal| (arg) (|
|00005ec0| 62 79 74 65 2d 63 6f 64 | 65 20 22 08 c8 3d 86 09 |byte-cod|e "..=..|
|00005ed0| 00 08 c9 3d 3f 85 1c 00 | 0a 85 12 00 6c 83 19 00 |...=?...|....l...|
|00005ee0| c3 82 1a 00 69 89 11 88 | ca 0c 21 3f 83 2a 00 cb |....i...|..!?.*..|
|00005ef0| 0d 21 82 5a 00 0d cc 56 | 85 44 00 cd ce 21 88 cf |.!.Z...V|.D...!..|
|00005f00| d0 21 88 cb ce 21 88 0d | 53 89 15 88 82 2a 00 88 |.!...!..|S....*..|
|00005f10| 0d cc 57 85 5a 00 cd d0 | 21 88 d1 20 88 0d 54 89 |..W.Z...|!.. ..T.|
|00005f20| 15 88 82 45 00 88 0e 06 | 86 61 00 09 c3 3d 83 6b |...E....|.a...=.k|
|00005f30| 00 d2 20 82 73 00 d3 0e | 06 86 72 00 09 21 88 c7 |.. .s...|..r..!..|
|00005f40| 87 22 20 5b 6c 61 73 74 | 2d 63 6f 6d 6d 61 6e 64 |." [last|-command|
|00005f50| 20 74 65 6d 70 6f 72 61 | 72 79 2d 67 6f 61 6c 2d | tempora|ry-goal-|
|00005f60| 63 6f 6c 75 6d 6e 20 74 | 72 61 63 6b 2d 65 6f 6c |column t|rack-eol|
|00005f70| 20 74 20 73 65 6c 65 63 | 74 69 76 65 2d 64 69 73 | t selec|tive-dis|
|00005f80| 70 6c 61 79 20 61 72 67 | 20 67 6f 61 6c 2d 63 6f |play arg| goal-co|
|00005f90| 6c 75 6d 6e 20 6e 69 6c | 20 6e 65 78 74 2d 6c 69 |lumn nil| next-li|
|00005fa0| 6e 65 20 70 72 65 76 69 | 6f 75 73 2d 6c 69 6e 65 |ne previ|ous-line|
|00005fb0| 20 69 6e 74 65 67 65 72 | 70 20 66 6f 72 77 61 72 | integer|p forwar|
|00005fc0| 64 2d 6c 69 6e 65 20 30 | 20 76 65 72 74 69 63 61 |d-line 0| vertica|
|00005fd0| 6c 2d 6d 6f 74 69 6f 6e | 20 31 20 66 6f 72 77 61 |l-motion| 1 forwa|
|00005fe0| 72 64 2d 63 68 61 72 20 | 2d 31 20 62 65 67 69 6e |rd-char |-1 begin|
|00005ff0| 6e 69 6e 67 2d 6f 66 2d | 6c 69 6e 65 20 65 6e 64 |ning-of-|line end|
|00006000| 2d 6f 66 2d 6c 69 6e 65 | 20 6d 6f 76 65 2d 74 6f |-of-line| move-to|
|00006010| 2d 63 6f 6c 75 6d 6e 5d | 20 31 30 29 29 0a 0a 28 |-column]| 10))..(|
|00006020| 64 65 66 75 6e 20 73 65 | 74 2d 67 6f 61 6c 2d 63 |defun se|t-goal-c|
|00006030| 6f 6c 75 6d 6e 20 28 61 | 72 67 29 20 22 5c 0a 53 |olumn (a|rg) "\.S|
|00006040| 65 74 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 68 |et the c|urrent h|
|00006050| 6f 72 69 7a 6f 6e 74 61 | 6c 20 70 6f 73 69 74 69 |orizonta|l positi|
|00006060| 6f 6e 20 61 73 20 61 20 | 67 6f 61 6c 20 66 6f 72 |on as a |goal for|
|00006070| 20 5c 5c 5b 6e 65 78 74 | 2d 6c 69 6e 65 5d 20 61 | \\[next|-line] a|
|00006080| 6e 64 20 5c 5c 5b 70 72 | 65 76 69 6f 75 73 2d 6c |nd \\[pr|evious-l|
|00006090| 69 6e 65 5d 2e 0a 54 68 | 6f 73 65 20 63 6f 6d 6d |ine]..Th|ose comm|
|000060a0| 61 6e 64 73 20 77 69 6c | 6c 20 6d 6f 76 65 20 74 |ands wil|l move t|
|000060b0| 6f 20 74 68 69 73 20 70 | 6f 73 69 74 69 6f 6e 20 |o this p|osition |
|000060c0| 69 6e 20 74 68 65 20 6c | 69 6e 65 20 6d 6f 76 65 |in the l|ine move|
|000060d0| 64 20 74 6f 0a 72 61 74 | 68 65 72 20 74 68 61 6e |d to.rat|her than|
|000060e0| 20 74 72 79 69 6e 67 20 | 74 6f 20 6b 65 65 70 20 | trying |to keep |
|000060f0| 74 68 65 20 73 61 6d 65 | 20 68 6f 72 69 7a 6f 6e |the same| horizon|
|00006100| 74 61 6c 20 70 6f 73 69 | 74 69 6f 6e 2e 0a 57 69 |tal posi|tion..Wi|
|00006110| 74 68 20 61 20 6e 6f 6e | 2d 6e 69 6c 20 61 72 67 |th a non|-nil arg|
|00006120| 75 6d 65 6e 74 2c 20 63 | 6c 65 61 72 73 20 6f 75 |ument, c|lears ou|
|00006130| 74 20 74 68 65 20 67 6f | 61 6c 20 63 6f 6c 75 6d |t the go|al colum|
|00006140| 6e 0a 73 6f 20 74 68 61 | 74 20 5c 5c 5b 6e 65 78 |n.so tha|t \\[nex|
|00006150| 74 2d 6c 69 6e 65 5d 20 | 61 6e 64 20 5c 5c 5b 70 |t-line] |and \\[p|
|00006160| 72 65 76 69 6f 75 73 2d | 6c 69 6e 65 5d 20 72 65 |revious-|line] re|
|00006170| 73 75 6d 65 20 76 65 72 | 74 69 63 61 6c 20 6d 6f |sume ver|tical mo|
|00006180| 74 69 6f 6e 2e 22 20 28 | 69 6e 74 65 72 61 63 74 |tion." (|interact|
|00006190| 69 76 65 20 22 50 22 29 | 20 28 62 79 74 65 2d 63 |ive "P")| (byte-c|
|000061a0| 6f 64 65 20 22 c2 88 08 | 83 10 00 c2 89 11 88 c3 |ode "...|........|
|000061b0| c4 21 82 1a 00 69 89 11 | 88 c3 c5 c6 21 09 5c 22 |.!...i..|....!.\"|
|000061c0| 88 c2 87 22 20 5b 61 72 | 67 20 67 6f 61 6c 2d 63 |..." [ar|g goal-c|
|000061d0| 6f 6c 75 6d 6e 20 6e 69 | 6c 20 6d 65 73 73 61 67 |olumn ni|l messag|
|000061e0| 65 20 22 4e 6f 20 67 6f | 61 6c 20 63 6f 6c 75 6d |e "No go|al colum|
|000061f0| 6e 22 20 73 75 62 73 74 | 69 74 75 74 65 2d 63 6f |n" subst|itute-co|
|00006200| 6d 6d 61 6e 64 2d 6b 65 | 79 73 20 22 47 6f 61 6c |mmand-ke|ys "Goal|
|00006210| 20 63 6f 6c 75 6d 6e 20 | 25 64 20 28 75 73 65 20 | column |%d (use |
|00006220| 5c 5c 5b 73 65 74 2d 67 | 6f 61 6c 2d 63 6f 6c 75 |\\[set-g|oal-colu|
|00006230| 6d 6e 5d 20 77 69 74 68 | 20 61 6e 20 61 72 67 20 |mn] with| an arg |
|00006240| 74 6f 20 75 6e 73 65 74 | 20 69 74 29 22 5d 20 35 |to unset| it)"] 5|
|00006250| 29 29 0a 0a 28 64 65 66 | 75 6e 20 74 72 61 6e 73 |))..(def|un trans|
|00006260| 70 6f 73 65 2d 63 68 61 | 72 73 20 28 61 72 67 29 |pose-cha|rs (arg)|
|00006270| 20 22 5c 0a 49 6e 74 65 | 72 63 68 61 6e 67 65 20 | "\.Inte|rchange |
|00006280| 63 68 61 72 61 63 74 65 | 72 73 20 61 72 6f 75 6e |characte|rs aroun|
|00006290| 64 20 70 6f 69 6e 74 2c | 20 6d 6f 76 69 6e 67 20 |d point,| moving |
|000062a0| 66 6f 72 77 61 72 64 20 | 6f 6e 65 20 63 68 61 72 |forward |one char|
|000062b0| 61 63 74 65 72 2e 0a 57 | 69 74 68 20 70 72 65 66 |acter..W|ith pref|
|000062c0| 69 78 20 61 72 67 20 41 | 52 47 2c 20 65 66 66 65 |ix arg A|RG, effe|
|000062d0| 63 74 20 69 73 20 74 6f | 20 74 61 6b 65 20 63 68 |ct is to| take ch|
|000062e0| 61 72 61 63 74 65 72 20 | 62 65 66 6f 72 65 20 70 |aracter |before p|
|000062f0| 6f 69 6e 74 0a 61 6e 64 | 20 64 72 61 67 20 69 74 |oint.and| drag it|
|00006300| 20 66 6f 72 77 61 72 64 | 20 70 61 73 74 20 41 52 | forward| past AR|
|00006310| 47 20 6f 74 68 65 72 20 | 63 68 61 72 61 63 74 65 |G other |characte|
|00006320| 72 73 20 28 62 61 63 6b | 77 61 72 64 20 69 66 20 |rs (back|ward if |
|00006330| 41 52 47 20 6e 65 67 61 | 74 69 76 65 29 2e 0a 49 |ARG nega|tive)..I|
|00006340| 66 20 6e 6f 20 61 72 67 | 75 6d 65 6e 74 20 61 6e |f no arg|ument an|
|00006350| 64 20 61 74 20 65 6e 64 | 20 6f 66 20 6c 69 6e 65 |d at end| of line|
|00006360| 2c 20 74 68 65 20 70 72 | 65 76 69 6f 75 73 20 74 |, the pr|evious t|
|00006370| 77 6f 20 63 68 61 72 73 | 20 61 72 65 20 65 78 63 |wo chars| are exc|
|00006380| 68 61 6e 67 65 64 2e 22 | 20 28 69 6e 74 65 72 61 |hanged."| (intera|
|00006390| 63 74 69 76 65 20 22 2a | 50 22 29 20 28 62 79 74 |ctive "*|P") (byt|
|000063a0| 65 2d 63 6f 64 65 20 22 | c1 88 08 3f 85 0e 00 6c |e-code "|...?...l|
|000063b0| 85 0e 00 c2 c3 21 88 c4 | c2 c5 08 21 5c 22 87 22 |.....!..|...!\"."|
|000063c0| 20 5b 61 72 67 20 6e 69 | 6c 20 66 6f 72 77 61 72 | [arg ni|l forwar|
|000063d0| 64 2d 63 68 61 72 20 2d | 31 20 74 72 61 6e 73 70 |d-char -|1 transp|
|000063e0| 6f 73 65 2d 73 75 62 72 | 20 70 72 65 66 69 78 2d |ose-subr| prefix-|
|000063f0| 6e 75 6d 65 72 69 63 2d | 76 61 6c 75 65 5d 20 35 |numeric-|value] 5|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.